searls03 Posted February 26, 2012 Share Posted February 26, 2012 somewhere in here is some syntax error....can you help me find it? I cant seem to find it: <?php } ?> <?php foreach($_POST["product"] AS $key => $val) { $product = $val;?> <form id="form1" action="#"> <fieldset class="radio"> <legend>Does <?php echo $val; ?> need to be ordered?</legend> <legend> <label for="rad1"><input type="radio" name="demo_radio<?php echo $val; ?>" id="rad1<?php echo $val; ?>" value="yes" > Yes</label><br> <label for="rad2"><input type="radio" name="demo_radio<?php echo $val; ?>" id="rad2<?php echo $val; ?>" value="no" > No</label> <div class="label" id="demo_radio_ta_label<?php echo $val; ?>"> <?php if ((strpos($val,'Sparring') || strpos($val,'Feet')) !== false){ ?> <form action="" method="post" class="sub"><input name="item" type="hidden" value="Sparring Feet: size" /> <select name="item1"> <option value="Child 12/13">Child 12/13</option> <option value="1/2">1/2</option> <option value="3/4">3/4</option> <option value="5/6">5/6</option> <option value="7/8">7/8</option> <option value="9/10">9/10</option> <option value="11/12">11/12</option> <option value="13/14">13/14</option> </select> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ((strpos($val,'Sparring') || strpos($val,'Hands')) !== false){ ?> <form action="" method="post" class="sub"> <input name="item1" type="hidden" value="Sparring Hands...shoe size: " /> please enter shoe size(hands are based on shoe size) <input name="hands" type="text" /> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ((strpos($val,'Sparring') || strpos($val,'Shins')) !== false){ ?> <form action="" method="post" class="sub"> <input name="item" type="hidden" value="Sparring shins...shoe size:" /> please enter shoe size(shins are based on shoe size) <input name="item1" type="text" /> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ((strpos($val,'Sparring') || strpos($val,'head')) !== false){ ?> <form action="" method="post" class="sub"> <input name="item" type="hidden" value="Sparring Head: size" /> please keep in mind most people are XL <select name="item1"> <option value="Small">Small</option> <option value="Medium">Medium/Lg</option> <option value="Large">X-Large</option> </select> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ((strpos($val,'Sparring') || strpos($val,'Elbow Pads')) !== false){ ?> <form action="" method="post" class="sub"> <input name="item" type="hidden" value="elbow pads" /> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ((strpos($val,'Sparring') || strpos($val,'Groin Protector')) !== false){ ?> <form action="" method="post" class="sub"> <input name="item" type="hidden" value="Groin protector size: " /> <select name="item1"> <option value='Child Cup Sm (20"-26")'>Child Cup Sm (20"-26")</option> <option value='Child Cup Lrg (26"-32")'>Child Cup Lrg (26"-32")</option> <option value='Adult Small (26"-32")'>Adult Small (26"-32")</option> <option value='Adult Medium (32"-38")'>Adult Medium (32"-38")</option> <option value='Adult Large (38"-44")'>Adult Large (38"-44")</option> <option value='Adult X-Large (44"-50")'>Adult X-Large (44"-50")</option> </select> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ((strpos($val,'ECAS') || strpos($val,'Gear')) !== false){ ?> <form action="" method="post" class="sub"><input name="item" type="hidden" value="Ecas Gear size " /> Shin/elbow <select name="shin/elbow"> <option value="Small">Small</option> <option value="Medium">Medium</option> <option value="Large">Large</option> <option value="X-Large">X-Large</option> </select> Shin/elbow <select name="glove"> <option value="Sm/Med">Sm/Med</option> <option value="Lg/Xl">Lg/Xl</option> </select> <input name="submit" type="submit" value="submit" /> </form> <?php } ?> </div> </legend> </fieldset> </form> <?php } ?> Quote Link to comment https://forums.phpfreaks.com/topic/257796-syntax/ Share on other sites More sharing options...
requinix Posted February 26, 2012 Share Posted February 26, 2012 The errors I see aren't syntax errors. Quote Link to comment https://forums.phpfreaks.com/topic/257796-syntax/#findComment-1321314 Share on other sites More sharing options...
searls03 Posted February 26, 2012 Author Share Posted February 26, 2012 ok, well what do you see? I figured it was syntax, but I guess not. I seem to have a problem with the fieldset and the div Quote Link to comment https://forums.phpfreaks.com/topic/257796-syntax/#findComment-1321315 Share on other sites More sharing options...
searls03 Posted February 26, 2012 Author Share Posted February 26, 2012 it has something to do with the fieldset............it is thinking it is outside of a form, even though it is inside the form. how do I fix this? <?php foreach($_POST["product"] AS $key => $val) { $product = $val;?> <form id="form1<?php echo $val;?>" action="#"> <fieldset><legend>Does <?php echo $val; ?> need to be ordered?</legend> <legend> <label for="rad1"> <input type="radio" name="demo_radio<?php echo $val;?>" id="rad1<?php echo $val; ?>" value="yes">Yes</label> <br/> <label for="rad2"><input type="radio" name='demo_radio<?php echo $val; ?>' id='rad2<?php echo $val; ?>' value='no'> No</label> <div class='label' id='demo_radio_ta_label<?php echo $val; ?>'> <?php if ((strpos($val,'Sparring') || strpos($val,'Feet')) !== false){ ?> <form action="insert.php" method="post" enctype="multipart/form-data" > <select name="item1"> <option value="Child 12/13">Child 12/13</option> <option value="1/2">1/2</option> <option value="3/4">3/4</option> <option value="5/6">5/6</option> <option value="7/8">7/8</option> <option value="9/10">9/10</option> <option value="11/12">11/12</option> <option value="13/14">13/14</option> </select> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ((strpos($val,'Sparring') || strpos($val,'Hands')) !== false){ ?> <form action="" method="post" class="sub"> <input name="item" type="hidden" value="Sparring Hands...shoe size: " /> please enter shoe size(hands are based on shoe size) <input name="item1" type="text" /> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ((strpos($val,'Sparring') || strpos($val,'Shins')) !== false){ ?> <form action="" method="post" class="sub"> <input name="item" type="hidden" value="Sparring shins...shoe size:" /> please enter shoe size(shins are based on shoe size) <input name="item1" type="text" /> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ((strpos($val,'Sparring') || strpos($val,'head')) !== false){ ?> <form action="" method="post" class="sub"> <input name="item" type="hidden" value="Sparring Head: size" /> please keep in mind most people are XL <select name="item1"> <option value="Small">Small</option> <option value="Medium">Medium/Lg</option> <option value="Large">X-Large</option> </select> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ((strpos($val,'Sparring') || strpos($val,'Elbow Pads')) !== false){ ?> <form action="" method="post" class="sub"> <input name="item" type="hidden" value="elbow pads" /> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ((strpos($val,'Sparring') || strpos($val,'Groin Protector')) !== false){ ?> <form action="" method="post" class="sub"> <input name="item" type="hidden" value="Groin protector size: " /> <select name="item1"> <option value='Child Cup Sm (20"-26")'>Child Cup Sm (20"-26")</option> <option value='Child Cup Lrg (26"-32")'>Child Cup Lrg (26"-32")</option> <option value='Adult Small (26"-32")'>Adult Small (26"-32")</option> <option value='Adult Medium (32"-38")'>Adult Medium (32"-38")</option> <option value='Adult Large (38"-44")'>Adult Large (38"-44")</option> <option value='Adult X-Large (44"-50")'>Adult X-Large (44"-50")</option> </select> <input name="submit" type="submit" value="submit" /> </form> <?php } else if ($val=='Sparring/Ecas Gear:ECAS Gear'){ ?> <form action="" method="post" class="sub"><input name="item" type="hidden" value="Ecas Gear size " /> Shin/elbow <select name="shin/elbow"> <option value="Small">Small</option> <option value="Medium">Medium</option> <option value="Large">Large</option> <option value="X-Large">X-Large</option> </select> Shin/elbow <select name="glove"> <option value="Sm/Med">Sm/Med</option> <option value="Lg/Xl">Lg/Xl</option> </select> <input name="submit" type="submit" value="submit" /> </form> <?php } ?> </div></legend></fieldset></form> <?php } ?> Quote Link to comment https://forums.phpfreaks.com/topic/257796-syntax/#findComment-1321329 Share on other sites More sharing options...
trq Posted February 26, 2012 Share Posted February 26, 2012 Why don't you tell us what the issue is? We are not mind readers! Quote Link to comment https://forums.phpfreaks.com/topic/257796-syntax/#findComment-1321348 Share on other sites More sharing options...
searls03 Posted February 26, 2012 Author Share Posted February 26, 2012 sorry, I got it figured out. I will mark as solved. Quote Link to comment https://forums.phpfreaks.com/topic/257796-syntax/#findComment-1321350 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.