Results 1 to 5 of 5

Thread: session question

  1. #1

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    session question

    hi this is more of a theory question,

    i have a login page all working fine etc... it creates a cookie

    in myglobal .asx file is that what can i use that to write to the database
    for example what i want is that i write to the database a 1 in a new column i create called logged in,
    therefore no one else can log in if column logged in is set to 1 for that user

    can these inserts be done on session start and session end from my point of view
    it works 60% of the time, all the time.

  2. #2
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: session question

    errrr...so you only want one person ever to log into the DB?

    Or do you only want to have one user logging in to only one session?
    Ie they can't log in using 2 Pcs.

    Woka

  3. #3

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    Re: session question

    the second one

    cant use 2 pcs
    it works 60% of the time, all the time.

  4. #4
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: session question

    OK...you would update the DB after you validate the user login, then in Session_end, or when the user clicks logoff, you would update the Db to say they were already logged in.

    What I would do is create a GUID or someting and store than it the DB and in the session. When they request a page I would check the value of the GUID in session against the DB one. If it's different, meaning they logged into another PC, then don't let them do anything, show an error page saying they are logged out of this session.

    Make sesne?

    Woka

  5. #5

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    Re: session question

    i think wot i can do is,
    when i validate a user,
    one of the validations shall be that the column logged_in is 0
    then when they are vlidate i write a 1 to the column logged in

    in session end then i write a 0 back to the db

    is this right
    it works 60% of the time, all the time.

Posting Permissions

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



Click Here to Expand Forum to Full Width