January 15th, 2011, 05:21 AM
-
How to manage session
I have create login table for password and user id authentication. Now how to manage sessions for logout. should i create a new table and save a session ID for every new login and handle on every page. etc... or is there any standard functionality available to handle sessions.
dim Query,sConnString,RS,vid,pwd
vid = Trim(Request("T1"))
pwd = Trim(Request("T2"))
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("db/db.mdb")
Set connection = Server.CreateObject("ADODB.Connection")
connection.Open(sConnString)
Second,
I am redirecting to main page on successful login. But it is carrying variables informations in address bar. How to hide that. Please help. following is the code i have written.
Query = "SELECT * FROM login "
Query = Query & "WHERE id='"& vid & "' "
Query = Query & " and pwd='"& pwd & "' "
Set RS = Connection.Execute(Query)
If RS.EOF Then
Response.Write "<br><br><br><br><br><br><center><h2>Wrong ID or Password</h2></center> "
Else
response.write "heelooooo"
Response.Redirect "main.asp?T1=" & vid
January 15th, 2011, 05:13 PM
-
You can find information about all the asp built-in objects here, including the session object.
http://msdn.microsoft.com/en-us/libr...=vs.90%29.aspx
======
Doug G
======
I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton