Eggzorcist Posted September 24, 2008 Share Posted September 24, 2008 Hi, I used to always do: if (isset($_POST['submit'])){... However now it doesnt work... :S Link to comment https://forums.phpfreaks.com/topic/125584-solved-how-to-use-submit-buttons/ Share on other sites More sharing options...
waynew Posted September 24, 2008 Share Posted September 24, 2008 Hey, Can you post us the HTML of your button? Link to comment https://forums.phpfreaks.com/topic/125584-solved-how-to-use-submit-buttons/#findComment-649279 Share on other sites More sharing options...
Eggzorcist Posted September 24, 2008 Author Share Posted September 24, 2008 <label> <input type="submit" name="submit" id="submit" value="Submit" /> </label> Link to comment https://forums.phpfreaks.com/topic/125584-solved-how-to-use-submit-buttons/#findComment-649281 Share on other sites More sharing options...
waynew Posted September 24, 2008 Share Posted September 24, 2008 Try this: if(isset($_POST['post_form'])){ Then <label> <input type="submit" name="post_form" id="post_form" value="Submit" /> </label> Link to comment https://forums.phpfreaks.com/topic/125584-solved-how-to-use-submit-buttons/#findComment-649282 Share on other sites More sharing options...
Eggzorcist Posted September 24, 2008 Author Share Posted September 24, 2008 still not responding... <?php require_once("functions.php"); if (isset($_POST['post_form'])){ register_user($_POST['username'], $_POST['password1'], $_POST['password2'], $_POST['email'], $_POST['securityCode']); } ?> <p>Username: <label> <input name="username" type="text" id="username" maxlength="15" /> </label> </p> <p> Password: <label> <input type="password" name="password1" id="password1" /> </label> </p> <p> Re-type Password: <label> <input type="password" name="password2" id="password2" /> </label> </p> <p> E-mail: <label> <input type="text" name="email" id="email" /> </label> </p> <p> <img src="captcha/captcha.php" alt="captcha" /><br /> Security Code: <label> <input name="securityCode" type="text" id="securityCode" maxlength="5" /> </label> </p> <p> <label> <input type="submit" name="post_form" id="post_form" value="Submit" /> </label> </p> Link to comment https://forums.phpfreaks.com/topic/125584-solved-how-to-use-submit-buttons/#findComment-649287 Share on other sites More sharing options...
waynew Posted September 24, 2008 Share Posted September 24, 2008 You haven't set up a form around it. <form id="reg" action="" method="post"> <p>Username: <label> <input name="username" type="text" id="username" maxlength="15" /> </label> </p> <p> Password: <label> <input type="password" name="password1" id="password1" /> </label> </p> <p> Re-type Password: <label> <input type="password" name="password2" id="password2" /> </label> </p> <p> E-mail: <label> <input type="text" name="email" id="email" /> </label> </p> <p> <img src="captcha/captcha.php" alt="captcha" /><br /> Security Code: <label> <input name="securityCode" type="text" id="securityCode" maxlength="5" /> </label> </p> <p> <label> <input type="submit" name="post_form" id="post_form" value="Submit" /> </label> </p></form> Link to comment https://forums.phpfreaks.com/topic/125584-solved-how-to-use-submit-buttons/#findComment-649288 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.