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

    Join Date
    Nov 2008
    Posts
    7
    Rep Power
    0

    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
  2. #2
  3. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    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
    ======
    It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

IMN logo majestic logo threadwatch logo seochat tools logo