Re: Dealing with session expiry

From: Date: Sun, 19 Oct 2003 19:18:02 +0000
Subject: Re: Dealing with session expiry
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-166675@lists.php.net to get a copy of this message
Radek Zajkowski wrote:
I notice sites using login detect expiry automatically and refrest the pages + session, I just don't quite know how to apprach it.
All you need to do is check that your session variables exist before you use them, otherwise set the values to a default. The method you're talking about is a simple: if(!isset($_SESSION['logged_in'])) { redirect_to_main_page(); } -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#166675) next »