Jump to content

Recommended Posts

 

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>

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.