View Full Version : Password Confirmation

02-21-2003, 03:18 PM
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 !


02-21-2003, 05:27 PM
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

02-21-2003, 10:13 PM
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.

02-22-2003, 12:36 AM
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.

02-24-2003, 10:24 AM
Once again, thank you very much indeed !

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum