Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Confirming a Password

Status
Not open for further replies.

Kenny100

Technical User
Feb 6, 2001
72
NZ
Hi Guys and Gals

I'm in the middle of creating a small site where the user has to register before being able to read any info on the site.

I've set up a small form where the visitor enters a username and password to log in. If they are a new visitor they must register first. This again is a small form but I want them to enter their password in twice so that I can validate that they have typed it correctly (i.e. by comparing the two password fields). How do I compare two fields to ensure they are both the same and then allow the form to be submitted to the server? I'm a bit stuck!

Cheers,
Kenny.
 
my 1st thought is a straight comparison such as:

if passwordvar = passwordvar2 then
response.redirect etc.

you could additionally verify that the length is the same using LEN

you could get really complex with it and break it out letter by letter by using SPLIT (i think that's the one)
and verify each character that way but my guess is that would be ugly and probably unnecessary

hth
mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top