@ratcatemeSep 04.2008 — #if you go to a site that users session and bookmark the site on a page that requires a login then when you close and open your browser the session is lost(it is a cookie that is deleted when the browser closes)
the best way to check this is say you have $_SESSION['login'] and you set that to true when a user logsin then you can say
<?php if(isset($_SESSION['login'])){ //display pagee }else{ //You are logged out because your session has ended } ?>
@NogDogSep 04.2008 — #You could store a timestamp in the session data, and if it is more than X seconds old when a page is accessed, you could show such a message and have them log in again. Or you could just let PHP's session settings delete the session data when it gets past a certain age, and if a user accesses a page with a session cookie but has no session data, then show that message and have them log in again. (See the [url=http://www.php.net/manual/en/session.configuration.php]session runtime config options[/url], in particular the session.gc_probability, session.gc_divisor and session.gc_maxlifetime settings.)