Jump to content

Archived

This topic is now archived and is closed to further replies.

mb81

Information on Expired Sessions?

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Nope. When a session has expired both the client-side and server-side cookies are deleted (well expired and unreadable at least).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.