Jump to content


Information on Expired Sessions?

  • Please log in to reply
2 replies to this topic

#1 mb81

  • Members
  • PipPipPip
  • Advanced Member
  • 120 posts

Posted 09 May 2006 - 04:00 PM

I'm getting into some more advanced work with sessions and thought I would throw out a question: Is there any way, using just $_SESSION variables and PHP functions, to determine if there has ever been a session for that user?

I'm not really trying to get into cookies and all that, just trying to see if the person has been there before and send give them a different message based on that information.

#2 trq

  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 09 May 2006 - 04:57 PM

Nope. When a session has expired both the client-side and server-side cookies are deleted (well expired and unreadable at least).

#3 wildteen88

  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 09 May 2006 - 07:22 PM

Actually no cookies/session files get deleted from the client or the server. What happens is PHP sets a sessionid in a special cookie which wont work after the user closes the browser or if the script that uses sessesions destroys the session.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users