Help verifying that passwords match |
Help verifying that passwords match |
tyler.watkins |
Apr 9 2012, 06:28 PM
Post
#1
|
Novice Group: Members Posts: 27 Joined: 6-March 12 Member No.: 16,654 |
I am working on a website and I am trying to make a registration page and a members login. I am fairly new to coding and I really enjoy it. The question i have now is how do i verify that both passwords match on the registration page. Like when they go to sign up, the password and the confirm password fields match.
the page I am having the trouble on is: http://blocks.netne.net/register.html Also please have a look around the site and see if you have any suggestions for me. I realize that my coding might not be the best. Also if you have any suggestions or if you could help me with setting up the whole login system, please reply or pm me. Thanks in advance!!! PS I am not really sure if this is the right place for this topic. This post has been edited by tyler.watkins: Apr 9 2012, 06:29 PM |
tyler.watkins |
Apr 9 2012, 07:56 PM
Post
#2
|
Novice Group: Members Posts: 27 Joined: 6-March 12 Member No.: 16,654 |
How would I do that? Any idea how the code will look?
|
Enhanced Software Solutions |
May 8 2012, 04:31 AM
Post
#3
|
Newbie Group: Members Posts: 12 Joined: 22-March 12 From: Tenali Member No.: 16,762 |
How would I do that? Any idea how the code will look? U can use the following java script function for comparing password and confirm password CODE <script type="text/javascript" language="JavaScript"> function checkPassword(theForm) { if (theForm.password.value != theForm.verify.value) { alert('Passwords are not same'); document.getElementById("verify").focus(); return false; } else { return true; } } </script> And call this javascript function on submit <form action="../" onsubmit="return checkPassword(this);"> </form> Hope this will help you. |
Lo-Fi Version | Time is now: 26th April 2024 - 11:00 AM |