mindapolis Posted July 13, 2012 Share Posted July 13, 2012 hi, could someone help me understand why after clicking the submit button it doesn't say submitted successfully? This is the lone thing about the issset function that I don't understand. <?php require_once("functions.php"); ?> <!DOCTYPE HTML> <html lang="en"> <head> <meta charset="utf-8"> <title>Untitled Document</title> <!--meta description --> <link rel="stylesheet" href="siteServices.css"> <!--[if It IE 9]> <script src="http://html5shiv.googlecode-.com/svn/trunk/html5.js"> </script> <![endif]--> <style type="text/css"> #contactForm { clear:both; margin-left:auto; margin-right:auto; text-align:center; } </style> </head> <body> <div id="mainContent"> <div id="companyInfo"> <div id="header"> <?php logo(); ?> <div id="nav"> <?php menu(); ?> </div> </div> </div> <table id="contactForm"> <?php if(!isset($_POST['submit'])) { ?> <form action="" "" method="post"> <tr> <td> First Name: </td> <td> <input name="fname" type="text" size="10" maxlength="20"></td> <td> Last Name: </td> <td> <input name="lname" type="text" size="15" maxlength="30"></td </tr> <tr> <td> Address: </td> <td> <input name="address" type="text" size="10" maxlength="20"></td> </tr> <tr> <td> <input name="submit" type="button" value="Contact Me! "></td> </tr> </form> <?php } echo "submitted successfully"; ?> </table> <footer> <?php contactInfo(); ?> </ footer> </div> </body> </html> Link to comment https://forums.phpfreaks.com/topic/265625-submit-button-problem/ Share on other sites More sharing options...
scootstah Posted July 13, 2012 Share Posted July 13, 2012 Well for starters, it will always say "submitted successfully", because there is no else statement. But, your problem is that your submit button is of type button when it should be of type submit. Link to comment https://forums.phpfreaks.com/topic/265625-submit-button-problem/#findComment-1361326 Share on other sites More sharing options...
mindapolis Posted July 13, 2012 Author Share Posted July 13, 2012 I saw the type button error right after I submitted the question, but there is a else statement right after the ending form tag Link to comment https://forums.phpfreaks.com/topic/265625-submit-button-problem/#findComment-1361332 Share on other sites More sharing options...
scootstah Posted July 13, 2012 Share Posted July 13, 2012 No there isn't. There is only a closing bracket to the if statement. Link to comment https://forums.phpfreaks.com/topic/265625-submit-button-problem/#findComment-1361333 Share on other sites More sharing options...
mindapolis Posted July 13, 2012 Author Share Posted July 13, 2012 I see what I did, sorry Link to comment https://forums.phpfreaks.com/topic/265625-submit-button-problem/#findComment-1361338 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.