Jump to content

ASP and Databases


Reachster

Recommended Posts

Hey, I need some information please, Can i get, if possible some examples of database connected to ASP website in ASP source code, If not answer these two qtns if you can 1) How can i make it so that when someone signs up it goes into my database. 2) How is the login verified when people have signed up and are attempting to login with their password. Thanks whoever can helpReachster

Link to comment
Share on other sites

2) How is the login verified when people have signed up and are attempting to login with their password. Thanks whoever can helpReachster

You need to create a login form with the fields USERNAME and PASSWORD.When you click login, you need to be taken to a new ASP page.On that page, you need a program which saves the username and password collected from the login form to a variable.Use the USERNAME variable to then search your database for the username and password. IE:SQL:SELECT username, userpass FROM login WHERE username='" & request.form("username") & "'"Then, assign these two entries you've collected from the database to two other variables. for instance: collected_username and collected_passwordYou then need to compare the password submited via the login form to the password collected from the database using the IF ELSE function.IF request.form("username")=collected_username AND if request.form("password")=collected_password THENresponse.redirect("controlpanel.asp")ELSEresponse.redirect("failed.asp")END IF
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...