+ Reply to Thread
Results 1 to 4 of 4

Thread: Dual validating password fields
      
   

  1. #1
    dr.maturin is offline Private
    Join Date
    Aug 2006
    Posts
    4

    Default Dual validating password fields

    Can anyone tell me how to have 2 password fields so that the 2nd field validates that the password entered in the 1st field is correct and returns an error message and resets both fields if the passwords don't match.

    Apologies if this is on a forum list somewhere, but I haven't been able to find it.

    Thanks.

  2. #2
    bill2006's Avatar
    bill2006 is offline Lieutenant General
    Join Date
    May 2006
    Posts
    3,422

    Default Re: Dual validating password fields

    There are several posts on this
    http://www.vodahost.com/vodatalk/gen...ight=passwords

    http://www.vodahost.com/vodatalk/blu...ight=passwords

    Do a search above for more.
    Hope this helps.

  3. #3
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,062

    Default Re: Dual validating password fields

    You need to have two password fileds in your form. Call the first one "password" and the seconf one "password1".

    Now in your php processing script, you need to implement these lines of code:

    @$password = addslashes($_POST['password']);
    @$password1 = addslashes($_POST['password1']);

    if( $password != $password1 )
    {
    header("Location: error_page.html");
    exit;
    }

    Put these lines in your script, before the mail sending part.
    Create and publish an "error_page" in BV with a Back button in it and the appropriate message. Have a look at How to upload a file using a form
    to see how to create this error page and how to put a "Back to the form" button.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  4. #4
    dr.maturin is offline Private
    Join Date
    Aug 2006
    Posts
    4

    Default Re: Dual validating password fields

    Thanks for these responses. Much appreciated.

    Martin

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49