asmith Posted December 12, 2007 Share Posted December 12, 2007 i've got a user register page , where the form and the script are in one ile (i'm using $_SERVER[PhP_SELF]) when i fill the form and i press he enter button on keyboard the page would reload, and nothing would happen, even if i fill the page wrong, no error will be shown , but when i press my submit button on page by mouse , everything works fine, how can i fix the enter button on keyboard ? or disable it ? (without JAVA ) thanks Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 12, 2007 Share Posted December 12, 2007 thats because you must be checking for submit button click if (isset($_POST['submit'])) to get around this put a hidden field in your form say <input type="hidden" name="submitted" value="submitted"> and then check if (isset($_POST['submitted'])) hope its helpful Quote Link to comment Share on other sites More sharing options...
asmith Posted December 12, 2007 Author Share Posted December 12, 2007 yes that's true , i have that line, i didn't change anything, and just added the hidden input with the same name of the submit button , solved ! THANKS ! Quote Link to comment 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.