Yes, always remember that unset() deletes the REFERENCE to the variable, not
the variable itself, so in the next page, when you session_start() again,
the reference is recreated to the still existing value.
So, session_unregister is fundamental to unregister the reference from the
To destroy the variable's value you must use $var = null;
Pedro Alberto Pontes
"Dan Hardiker" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I somehow cannot unset Session variables. If I set for example
> > $_SESSION["error"]="formcheck" (the new style) and I want to unset it
> > at the end of the page (unset($_SESSION["error"])), it's there again on
> > the next page.
> > Is there a special way to unset the new Session variables?
> Seen as you used session_register to set the session variable, it would
> make sense for you to use session_unregister to do the inverse.
> Dan Hardiker [[EMAIL PROTECTED]]
> ADAM Software & Systems Engineer
> First Creative Ltd
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php