Computing.Net > Forums > Web Development > ASP Session Variables

ASP Session Variables

Reply to Message Icon

Original Message
Name: bob_1980
Date: February 5, 2005 at 11:09:55 Pacific
Subject: ASP Session Variables
OS: Server 2003
CPU/Ram: 1.9GHz/1GB
Comment:

Hi All!

I have made an ASP login system that verifies the username and password in a database. if the username and password are ok, it sets the session variable "Okeydokey" to True.
My question is... how can i make the script print the information entered into the username box (uid)?? my script is below.

thanks in advance,
bob.


<%

Set conn = server.createobject("adodb.connection")
DSNtemp = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("/settings/usersystem/users.mdb")

If InStr(Request.Form("uid"),"'") Then
uid = Replace(Request.Form("uid"),"'"," ")
Else
uid = Request.Form("uid")
End If
If InStr(Request.Form("pwd"),"'") Then
pwd = Replace(Request.Form("pwd"),"'"," ")
Else
pwd = Request.Form("pwd")
End If


SQL = "Select * From users Where uid = '" & uid & "' And pwd = '" & pwd & "'"
Set RS = Conn.Execute(SQL)

If Not RS.EOF Then
Session("okeydokey") = True


Set RS = Nothing
Conn.Close

Response.Redirect "index2.asp"
Else

Set RS = Nothing
Conn.Close
Response.Redirect "/default.asp?type=4"

End If
%>

Bob Jonson Thanks You


Report Offensive Message For Removal








Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: ASP Session Variables

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software