I'm just wondering..
assume i create session variables using
$_SESSION['userid'] = "username";
$_SESSION['password'] = "password";
$_SESSION['admin'] = "admin";
then i unset them using:
unset ($_SESSION['userid']);
unset ($_SESSION['password']);
session_destroy();
Taking this piece of information in mind:
session_destroy() destroys all of the data associated with the current session
will the call to session_destroy() also delete the value in $_SESSION['admin']?
or will it stay since i didn't explicitly unset $_SESSION['admin']?
my guess is that all the session variables will be gone (the keys and values), but i just want to verify...
btw, if l leave out the session_destroy() from the two unset()'s, is it bad?
When i use the session variables, i always check for the values in it (not only checking if it exists), so ...
thanks.
assume i create session variables using
$_SESSION['userid'] = "username";
$_SESSION['password'] = "password";
$_SESSION['admin'] = "admin";
then i unset them using:
unset ($_SESSION['userid']);
unset ($_SESSION['password']);
session_destroy();
Taking this piece of information in mind:
session_destroy() destroys all of the data associated with the current session
will the call to session_destroy() also delete the value in $_SESSION['admin']?
or will it stay since i didn't explicitly unset $_SESSION['admin']?
my guess is that all the session variables will be gone (the keys and values), but i just want to verify...
btw, if l leave out the session_destroy() from the two unset()'s, is it bad?
When i use the session variables, i always check for the values in it (not only checking if it exists), so ...
thanks.