So I'm coding a form in html and ASP and so far I have it working perfectly in terms of going from one page of the form to the next and shooting off an email at the end as verification of the form input.
What I've just inserted into the code now are some new form elements, namely a password and confirm password (this is for a member registration form).
What I want is for the page to proceed to the next part of the form if the password is the same as the confirm password, and to blast an error if the password values are not the same.
The select case statement that involves moving from one page to another (which worked until I inserted the bolded items) is this
Select Case Request.Form("navigate")
Case "< Back"
intCurrentPage = intPreviousPage - 1
Case "Next >"
[B]If Request.Form("cWP") = Request.Form("cWPconfirm") Then[/B]
intCurrentPage = intPreviousPage + 1
[B]Else
AbortMessage = "Password mismatch, please re-enter and reconfirm password"
End If[/B]
Case Else
' Either it's our first run of the page and we're on page 1 or
' the form is complete and pages are unimportant because we're
' about to process our data!
intCurrentPage = 1
End Select
I want to break out of the select statement once I reach the password mismatch, but the term "break" does nothing in ASP, so I'm wondering what is it's equivalent, or if there is even a way in the first place to exit from a select case statement.
Thanks so much beforehand for any and all advice. I hope nothing that I've mentioned so far is unclear or vague. Let me know if it is and I will try to clarify.
-LP