Re: deleting session variables
| From: | Curt Zirzow | Date: | Tue, 19 Aug 2003 20:48:40 +0000 |
| Subject: | Re: deleting session variables | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160085@lists.php.net to get a copy of this message | ||
* Thus wrote Tim Winters (csnm@samplingtechnologies.com):
> Thanks,
>
> So what does session_unset() do then?
John overlooked that function, and instead looped through the
variables in php instead. This would be used if you have
register_globals on and choose to use sessions insecurely.
>
> -----Original Message-----
> From: CPT John W. Holmes [mailto:holmes072000@charter.net]
> Sent: August 19, 2003 5:11 PM
> To: csnm@samplingtechnologies.com; php-general@lists.php.net
> Subject: Re: [PHP] deleting session variables
>
>
> If register_globals is ON and you want to get rid of $val1, $val2,
> $val3,
> etc... then:
>
> foreach($_SESSION as $key => $value)
> { unset($$key); }
>
Curt
--
"I used to think I was indecisive, but now I'm not so sure."