kayz100 Posted August 15, 2013 Share Posted August 15, 2013 Hi guys, I have two forms on one php page, the forms work fine if they are on different pages but I want both of them on one page to make my registration/login page look trendy and modern. However, I have come to an abrupt halt as the two forms fail to execute. One works fine and the other is ignored completely. How do I get both of them executing at different intervals even though they are on one page? I think I have a problem on the 'return false'. The registration form works fine but the login form is failing to work. I have two different ajax for processing this form please help. code of forms below, thank you //FORM 1 <div> <p style="text-align:center;;">REGISTRATION FORM</p> <form name="rgistrationform" id="registration" onsubmit="return false;"> <div>Username: </div> <input id="username" type="text" /> <div>Email:</div> <input id="email" type="text" /> <div>Enter Password:</div> <input id="pass1" type="password" /> <div>Repeat Password:</div> <input id="pass2" type="password" /> <br /> <button id="registerbtn" onclick="register()">Register</button> <br /> </form> </div> //FORM 2 <div> <h3 style="text-align:center;">LOGIN FORM</h3> <form id="loginform" onSubmit="return false;"> <div>Email Address:</div> <input type="text" id="email" /> <div>Password:</div> <input type="password" id="password" /> <br /><br /> <button id="loginbtn" OnClick="login()">LOG-IN</button> <br /> <a href="4gotpass.php"><strong>Forgot Password</strong></a> </form> Quote Link to comment Share on other sites More sharing options...
gristoi Posted August 15, 2013 Share Posted August 15, 2013 change them from button to <input type="submit" ... Quote Link to comment Share on other sites More sharing options...
kayz100 Posted August 15, 2013 Author Share Posted August 15, 2013 I have tried that but still not working, please anyone help? 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.