Print Page | Close Window

if x is not equal y then message else

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=2471
Printed Date: 28 March 2026 at 4:08am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: if x is not equal y then message else
Posted By: 288enzo
Subject: if x is not equal y then message else
Date Posted: 06 May 2003 at 6:43pm

I have been reading http://www.w3schools.com - www.w3schools.com  which is a great site for learning I must say, but I can find any script help on the following:

if I have two fields in my form "password" and "confirm_password", how do I make sure that what they typed into "confirm_password" is the same as the "password" field before proceeding on?

Thanks.




Replies:
Posted By: ultramods
Date Posted: 06 May 2003 at 6:50pm

IF password = confirm_password THEN

        'put everything into database

ELSE

         'handle the error

END IF

 



Posted By: 288enzo
Date Posted: 06 May 2003 at 9:25pm

That seems very easy.  Just a few more questions.

1. Where does the above script go (form page, or posting page)?

2. 'put everything into database?  How exactly do I do that, all I know is that the html script in the form takes care of that.

3. 'handle the error?  I don't know how to do this.  I know that in MS FrontPage you can set up automatic bots to create pop ups and move the cursor to the field that is incorrect, but I don't know how to manually create this script.  Any help on this would be much appreciated.

Thanks UltraMods.



Posted By: Gullanian
Date Posted: 07 May 2003 at 1:03am

Hmm tricky and long to explain it all here......

Check out borgs inserting data into database tutorial:
http://www.webwiz.net/asp/tutorials/add_to_database.asp - http://www.webwiz.net/asp/tutorials/add_to_database.asp

You might want to use javascript to check the passwords match instead of ASP scrpting, as its faster for the user to get the error and amend it, and takes up less server processing time.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net