Hello,
I am trying to make a log out for my script but I can't seem to do it.
I looked in the php manual and made my logout page code to look like this:
<?php
session_start();
$SESSION["loggined"] = 0;
unset($SESSION["loggined"]);
$SESSION = array();
if (isset($COOKIE[session_name()])) {
setcookie(session_name(),'',time()-42000,'/');
}
session_destroy();
header('Location:/reviews/');
?>
As you can see I tried everything, even the deprecated things, but nothing works, I am just always logged in.
Can you point me in the right direction?