Re: session_unregister???

From: Date: Tue, 31 Oct 2000 09:12:55 +0000
Subject: Re: session_unregister???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-22885@lists.php.net to get a copy of this message
> when i write > " session_name("temp"); > session_start(); > session_register("varname"); > $varname="hello"; > echo "$varname \n"; > session_unregister("varname"); > echo "$varname \n"; > " > output is > "hello hello" > > why has $varname a value "hello" after session_unregister("varname")? That's not very mysterious.. the session_* function removes and adds variables to the stored session. If you look at the code the variable is still defined in your program. If you want to unset the variable from the program too, and not just the session, use unset(). Cheers, Soeren Staun-Pedersen - staun@netwarriors.org ------ "The internet is full, beat it" - Me.

« previous php.general (#22885) next »