grungefreak Posted June 19, 2009 Share Posted June 19, 2009 Hi, I have been php programming for a long time. But this is doing my head in..I cannot get a form to post to my php file. I really cannot see where I'm going wrong. I press the submit button and nothing happens, not even an error. Here's the code: <form action="feedback.php" method="post"> <input name="name" type="text" value="name" class="textInput"/> <input name="email" type="text" value="email" class="textInput"/> <textarea name="comments" cols="" rows="" class="textInput"></textarea> <input name="submit" type="button" value="Submit"/> </form> The feedback.php file does exist and is in the same directory as the form... GF Quote Link to comment https://forums.phpfreaks.com/topic/162900-solved-basic-form-not-working/ Share on other sites More sharing options...
joel24 Posted June 19, 2009 Share Posted June 19, 2009 print out all the posted variables... i.e. put in print_r($_POST); exit(); on the top of your feedback.php form also you should probably swap <input type="button" with <input type="submit" Quote Link to comment https://forums.phpfreaks.com/topic/162900-solved-basic-form-not-working/#findComment-859527 Share on other sites More sharing options...
Daniel0 Posted June 19, 2009 Share Posted June 19, 2009 It has to be type="submit" A button is just that, a button. It doesn't have any default behavior. Quote Link to comment https://forums.phpfreaks.com/topic/162900-solved-basic-form-not-working/#findComment-859528 Share on other sites More sharing options...
grungefreak Posted June 19, 2009 Author Share Posted June 19, 2009 It has to be type="submit" Of course, I can't believe I didn't spot that. Thanks you . Solved. GF Quote Link to comment https://forums.phpfreaks.com/topic/162900-solved-basic-form-not-working/#findComment-859535 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.