Php script doesn't capture input fields -
Can someone hope me why my PHP script does not capture on my input field? The snippet and the relevant php bits of my code are below. The other aspect of this code that I use in other forms works well. Note that the current naming protocol is used for the total number in my JavaScript that works very well. Maybe some PP script does not like my naming protocol ??
HTML code;
& lt; TD ALIGN = CENTER> & Lt; INPUT TYPE = Hidden Name = Product_1_view value = "10.00" & gt; 10.00 & lt; / TD & gt; & Lt; TD align = center> & Lt; Selection Name = Product_1_qty onChange = FormatFields () & gt; & Lt; Option value = 0> 0 to & lt; Option value = 1> 1 & lt; Option value = 2> 2 & lt; Option value = 3> 3 & lt; Option value = 4> 4 & lt; Option value = 5> 5 & lt; / SELECT & gt; & Lt; / TD> & Lt; TD ALIGN = CENTER> & Lt; INPUT TYPE = text NAME = Product_1_subtitlen VALUE = "0.00" SIZE = 8> gt; & Lt; / TD> & Lt; TD ALIGN = CENTER> & Lt; INPUT TYPE = Hidden Name = Product_1 VALUE = "0,0" size = 10> gt; & Lt; / TD>
Php code; If (! Isset ($ _ POST ['Product_1_qty']) and $ _POST ['Product_1_qty']! = "" || isset ($ _ Post ['Product_1_subtotal']! ) In & amp;!! $ _POST ['Product_1_subtotal'] = "" || $ 1 product = $ _POST ['Product_1_qty']; $ email_message = "... .xxxx ..." .clean_string ( $ Product1). "\ N";
Use lowercase letters for properties And wrap them in double quotes. This will correct your HTML syntax.
Change this:
& lt; td align = "center" & gt; & lt; input Type = "hidden" name = "Product_1_value" value = "10.00" />10.00</td> & lt; td align = "center" & gt; & lt; f No name = "Product_1_qty" onChange = "FormatFields ()"> Option value = "0"> 0
If you have to close your if
statement, you'll end up with ||
that was not necessary.
Try this:
if ((isset ($ _ POST) ['Product_1_qty']) & amp; amp ;!! $ _POST ['Product_1_qty'] = "") || ($ 'Post [' Product_1_subtotal ']) & amp;!!! $ _POST [' Product_1_subtotal '] = "")) {$ Product1 = $ _POST [' product_1_kit ']; $ Email_message = "... xxxx ...: .clean_string ($ product1)." \ N ";}
Pair of other things: You close your input
tag with /
For more information, see Closed Bracket. See HTML
above.
In addition, there was some extra space between your HTML
Remove them to see the cleaner!
Comments
Post a Comment