SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot trekmp's Avatar
    Join Date
    Dec 2005
    Posts
    158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cookie countdown

    Not sure if this is a JS or PHP question so sorry if its in the wrong forum. I created the cookie using PHP.

    I've got a site that uses a simple cookie to tell if a user is logged in or not. Once logged in they have two hours before the cookie expiries. What I'd like to do is have a countdown on my screen somewhere that shows how long they have left before the cookie expiries and they are then logged out of the system.

    Can this be done and if so how?
    Why do we exist? What is our purpose?
    >H2O Developments
    >USS Endeavour
    >Hosted@Servage

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,449
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Use javascript to check the cookie every five minutes or so. You'll need to use setTimeOut() to do that.


Bookmarks

Posting Permissions

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