Re: Removing/unsetting session variables.

From: Date: Wed, 24 Dec 2003 13:28:26 +0000
Subject: Re: Removing/unsetting session variables.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-173295@lists.php.net to get a copy of this message
From: "Alain Williams" <addw@phcomp.co.uk> > I have several variables that I set in a session - to record that a user is logged in. > I want to be able to unset them - when they log out. > > $_SESSION['PERMS_USER'] = 'fred'; > Sets the variable quite nicely, I can also change it and the change is recorded. > I cannot unset it. I have tried (in various combinations): > > unset($_SESSION['PERMS_USER']); unset is what you should use. How do you know it's "not working"?? ---John Holmes...

« previous php.general (#173295) next »