ricklee Posted May 26, 2007 Share Posted May 26, 2007 Hi, I was wondering why I can't get my form to work. <form id="order_1" action="process1.php" method="POST"> <table> <tr><td>Email: </td><td><input type="text" name="email" id="email" value="" /></td></tr> <tr><td>Name: </td><td><input type="text" name="name" id="name" value="" /></td></tr> <tr><td>Address: </td><td><textarea name="address" rows="4" id="address"></textarea></td></tr> <tr><td>Phone: </td><td><input type="text" name="phone" id="phone" value="" /></td></tr> <tr><td>Additional comments: </td><td><textarea name="comments" rows="5" id="comments"></textarea></td></tr> <tr><td></td><td><input class="submit" type="submit" value="Continue" /></td></tr> </table> </form> When I fill in all the fields, submit the form and do var_dump on it, this is what I get: array(3) { ["email"]=> string(23) "emailaddress@domain.com" ["name"]=> string(12) "212-312-8982" ["comments"]=> string(38) "I have no additional comments to make." } As you can see, not only is it ignoring 2 fields, but the phone field is coming in as "name". I went through the code over and over again to see what I could have typed wrong, and I tried different things, but I've finally run out of ideas. If anyone can shed light on this, I would be very grateful. Thank you. Rick Quote Link to comment https://forums.phpfreaks.com/topic/53049-_post-doesnt-contain-all-my-form-elements/ Share on other sites More sharing options...
MadTechie Posted May 26, 2007 Share Posted May 26, 2007 posting the code may help.. only thing i can workout is you did something wrong! try print_r($_POST); at the top of process1.php Quote Link to comment https://forums.phpfreaks.com/topic/53049-_post-doesnt-contain-all-my-form-elements/#findComment-262049 Share on other sites More sharing options...
ricklee Posted May 28, 2007 Author Share Posted May 28, 2007 Hi MadTechie, Thanks for the tip. It works okay now. Rick Quote Link to comment https://forums.phpfreaks.com/topic/53049-_post-doesnt-contain-all-my-form-elements/#findComment-263063 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.