need some help

Results 1 to 2 of 2

Thread: need some help

  1. #1
    Join Date
    Dec 1969

    Default need some help

    Hi bill i need to know that to prevent the user not to access any page unless he login to the site I put a session check on each page that if the session user id ="" then redirect to login page<BR>the problem I want to know that how can i close the first window or the session in the first window if the user login from a separate window and if he is still login from any other location with the same use name and password like yahoo and hotmail if you login from a different widnow he will close the session of the previous login from a different location<BR><BR>any suggestions<BR><BR>Thanks Atif ur Rahim

  2. #2
    Join Date
    Dec 1969

    Default Have to use a database...

    ...or application variable.<BR><BR>Example: You have a "allUsers" DB table. And one of the fields in the table is "currentSessionID". And so instead of looking for a session variable of the right name, you look for the DB field to match the current Session.SessionID and, if it doesn&#039;t, log them off.<BR><BR>You *COULD* do this with an Application variable, too:<BR><BR>&#060;%<BR>If Application( Session("UserID") ) &#060;&#062; Session.SessionID Then<BR> Response.Write "You are already logged in via some other session"<BR> Response.End<BR>End If<BR>%&#062;<BR><BR>And when you log somebody in, you do<BR><BR>&#060;%<BR>Session("UserID") = UserID<BR>Applicaton(UserID) = Session.SessionID<BR>%&#062;<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts