I know from php.net that when register_global s is turned on,
session_start() ;
session_unset() ;
session_destroy ();
will succeed in unsetting all session variables and then destroying the
session. I also read on the site that when using $_SESSION, you
shouldn't use session_unset, but instead should use unset() to
accomplish the 2nd of the above tasks. This example is then given:
session_start() ;
$_SESSION = array();
session_destroy ();
I'm just confused because I don't see exactly where unset() is being
used... does the $_SESSION = array(); line do the same thing as unset(),
and if so, is this all that is needed to completely close a session?
Thanks so much for everyone's help, and also for everyone's patience
while answering questions.
Marcus
session_start() ;
session_unset() ;
session_destroy ();
will succeed in unsetting all session variables and then destroying the
session. I also read on the site that when using $_SESSION, you
shouldn't use session_unset, but instead should use unset() to
accomplish the 2nd of the above tasks. This example is then given:
session_start() ;
$_SESSION = array();
session_destroy ();
I'm just confused because I don't see exactly where unset() is being
used... does the $_SESSION = array(); line do the same thing as unset(),
and if so, is this all that is needed to completely close a session?
Thanks so much for everyone's help, and also for everyone's patience
while answering questions.
Marcus
Comment