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.
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")
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> "
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.
Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.