sphinx9999 Posted November 26, 2007 Share Posted November 26, 2007 I have a standard login page. If a user leaves the page for a while and then comes back they try and browse and are redirected to this page. This is confusing them ???. When a user's session expires I need to tell them that they have been logged out due to inactivity for n minutes. However, I do not want to put this on the page before they have logged in. What is left of a session when it expires? Is it completely destroyed by PHP? Is there any way of making a distinction between a session that was never created and one which has expired? My session looks something like this: Array ( [user_id] => 99999999 [permission] => 45 ) Thanx Quote Link to comment https://forums.phpfreaks.com/topic/78911-detect-ended-session/ Share on other sites More sharing options...
trq Posted November 26, 2007 Share Posted November 26, 2007 Is there any way of making a distinction between a session that was never created and one which has expired?[/quote] Not easily. There are a few custom session handling classes around and even tutorials on the subject if you google. These classes usually store session values in a database. this gives you alot more control over what can and can't be done with sessions. Its really not something that can be explained in a simple forum post. google for [i]custom php session class[/i] or something simular and you might find an article on the subject. Quote Link to comment https://forums.phpfreaks.com/topic/78911-detect-ended-session/#findComment-399359 Share on other sites More sharing options...
sphinx9999 Posted November 26, 2007 Author Share Posted November 26, 2007 OK, thanks Thorpe. Was kinda hoping it would be a really simple process but if not I'll just go with a generic msg ('You may have landed here because your browser has not been active in n mins' or something...) Quote Link to comment https://forums.phpfreaks.com/topic/78911-detect-ended-session/#findComment-399384 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.