Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Aug 2002
    Location
    Leeds
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Password Confirmation

    Hi there,

    This is proably dead easy to anyone with more than basic knowlege (and even some with basic)...

    I need to create a password logging utility, where a machine name is entered, then a local admin password is entered, but must be confirmed in a separate field....

    Can anyone help with the latter part, please (ie. checking the password is the same in both fields, before submitting it to the database) ???

    Thanks (yet again) in advance !

    Brad.

  • #2
    New Coder
    Join Date
    Jun 2002
    Location
    London & Oxford
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Create a form with 2 password fields and then on the ASP page where you deal with the form submission, do something like this:

    <%
    If Request.Form("fieldname1") <> Request.Form("fieldname2") Then
    Response.Write "The password fields do not match!"
    'more code here
    End If
    %>
    As easy as 3.1415926535897932384626433832795028841

  • #3
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Doing it with ASP on the serverside is a much safer way since the user cannot skip over this step. However, you have to worry about passing all the data back from the server to the client if this fails.

    The other option is doing it in javascript and just checking to see if the two passwords match before submitting the form. This is much easier and cleaner, but you have to worry about the users who disable java.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I usually like to use both... that way nothing is sent to the server (for users that have javascript enabled) unless they pass my validation.

    If they have javascript disabled, the server-side validation will catch it.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #5
    Registered User
    Join Date
    Aug 2002
    Location
    Leeds
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank you !

    Once again, thank you very much indeed !


  •  

    Posting Permissions

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