|
Posted by Vince Morgan on 04/25/07 14:18
"Jonno" <jonattree@gnosis-consultancy.co.uk> wrote in message
news:1177501291.323146.24910@s33g2000prh.googlegroups.com...
> Hi
>
> I am having a problem with session vars being propagated between pages
> on this site:
> =========== logout.php =============
> <?php
> session_start();
> // store to test if they *were* logged in
> $old_user = $_SESSION['loggedinusername'];
> unset($_SESSION['loggedinusername']);
> session_destroy();
This may not actualy destroy everything in the session. The example of
killing a session that uses cookies below is from
http://au.php.net/session_destroy
// Unset all of the session variables.
$_SESSION = array();
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-42000, '/');
}
// Finally, destroy the session.
session_destroy();
I don't think it's the answer to your prob though. I'll be very interested
to here what others have to say. There was a previous post a few days ago
about a similar problem.
Vince
[Back to original message]
|