Form Validation - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Form Validation

I am using a form validation in ASP. I made a simple html form in which i take input from user his name,password,confrim password and full name and while submitting i call an asp file in which i request all the feilds from the html form.
In this asp page i validate the username that it exists or not .Can i also validate that password and the confirm password is same or not.


  • bagles1bagles1 Posts: 54Member
    Yes this is easily done. However, I think you will find that it is much easier to validate all the information in JavaScript because it can be done before the form is posted. However, if you are only wanting to find out how to do it in ASP I just answered this questions a couple of questions down. The way I read your question was basically validating that the user has input something in the user name field and that the passwords equal each other. If this is the case then this simple script would work.

    if trim(request.form("username")) = "" then
    ' username was empty or not filled in
    end if
    if request.form("password") <> request.form("confirmpassword") then
    ' passwords did not match
    end if


Sign In or Register to comment.