% 'If the user has filled out the form and pressed the submit button IF request.querystring("step") = "2" THEN 'Open a new database connection adoCon.Open cstring 'Take values from the form str_Username = Request.Form ("username") str_Password = Request.Form ("password") 'Create new SQL string strSQL = "SELECT code " & _ "FROM tbl_Authors WHERE name = '" & str_Username & "' AND Password = '" & str_Password & "'" 'Create a new recordsheet Set rs_login = Server.CreateObject ("ADODB.RecordSet") 'Open the record sheet and execute SQL rs_login.open strSQL,adoCon 'If the username and password combination does not exist then redirect the user If rs_login.EOF _ Or rs_login.BOF Then Response.Redirect "badlogin.asp" Else 'Write the user code to the cookie Response.Cookies("Login")("userCode") = rs_login("code") 'Redirect to main page Response.redirect("home.asp") End If End if %>
|
|||||||||||||||||||||||||||||||
|
;;;;©2004
TtroyAlves.com - All Rights Reserved |
Design:
Foundation7 |
||||||||||||||||||||||||||||||