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 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" 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. 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 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
Archived
This topic is now archived and is closed to further replies.