Why I have to nullify the session variables?Is session_destroy not enough?
<?php
session_start();
$_SESSION = array();// <--Is necessary?
if (isset($_COOKIE[session_name()]])){
setcookie(session_name(),'',time()-42000,'/');
}
session_destroy();
header('Location:Login.php');
?>
It is a precautionary measure to nullify the values, just in case the object is not destroyed by the
session_destroy();.Just precautionary and good practice, it is not required.
Why are you starting a session and destroying it right away tho?