Re: Unsetting Session Variables
| From: | HiTCHO) | Date: | Wed, 30 Oct 2002 14:37:42 +0000 |
| Subject: | Re: Unsetting Session Variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-122024@lists.php.net to get a copy of this message | ||
Are you doing a session_start() on the page you are unsetting on?
Timothy Hitchens (HiTCHO)
tim@hitcho.com.au
If you need PHP hosting with an experienced
support team 24/7 then email me today.
On Wed, 30 Oct 2002, David Russell wrote:
> Hi all,
>
> I am having problems unsetting Session Variables - where I know it
> should work.
>
> I have a form. It contains both links with GET variables, and also a
> POST form. They all go to the same next page.
>
> Page 2 simply clears all session variables, and then sets them based
> upon the contents of the GET or POST array. It then calls page 3 which
> displays information based on the SESSION variable contents.
>
> My problem is that a session variable does not seem to unset. I am
> using:
>
> unset ($_SESSION['variablename']);
>
> But this does not seem to destroy the session variable. (it is still
> available later in other scripts)
>
> What can I do?
>
> David Russell
> IT Support Manager
> Barloworld Optimus (Pty) Ltd
> Tel: +2711 444-7250
> Fax: +2711 444-7256
> e-mail: DavidR@BarloworldOptimus.com
> web: www.BarloworldOptimus.com
>