1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2008
    Rep Power

    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")


    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.write "heelooooo"

    Response.Redirect "main.asp?T1=" & vid
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Rep Power
    You can find information about all the asp built-in objects here, including the session object.

    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

IMN logo majestic logo threadwatch logo seochat tools logo