Moved the header call to after setcookie, also added an exit statement.

This commit is contained in:
laf
2014-01-09 10:41:40 +00:00
parent 25368ccd34
commit b10ae234ac

View File

@ -25,10 +25,11 @@ if ($vars['page'] == "logout" && $_SESSION['authenticated'])
dbInsert(array('user' => $_SESSION['username'], 'address' => $_SERVER["REMOTE_ADDR"], 'result' => 'Logged Out'), 'authlog');
unset($_SESSION);
session_destroy();
header('Location: /');
setcookie ("username", "", time() - 60*60*24*100, "/");
setcookie ("password", "", time() - 60*60*24*100, "/");
$auth_message = "Logged Out";
header('Location: /');
exit;
}
if (isset($_GET['username']) && isset($_GET['password']))