note 76360 deleted from function.exit by googleguy

From: Date: Tue, 22 Oct 2013 08:00:09 +0000
Subject: note 76360 deleted from function.exit by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-196710@lists.php.net to get a copy of this message
Note Submitter: dan ---- In relation to the below comment, you may find that using the following may be more appropriate: <?php # ... user has pressed log out, cookies have been wiped, etc. // Stay on the same page at time of logout (useful if a page is also available to anyone who isn't logged in header ("Location: http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']); ?> Of course $_SERVER['PHP_SELF'] can be omitted if you wish to redirect to the root directory of the site (http://www.example.com) or a path of your choosing can be used instead. Alternatively, if you've a solid system implemented and logged out users can access the page too, you can continue with showing the page without using exit() or header().

« previous php.notes (#196710) next »