After loging in from the homepage and loging out from the welcome page, refreshing the site redirect me to the welcome page.
i'am running MySQL on alfahosting.de server
i've used the unset($_SESSION) but it's seems not working
session_start();
$error = "";
if(array_key_exists("logout", $_GET)){
unset($_SESSION);
setcookie("id", "", time() - 60*60);
$_COOKIE["id"] = "";
}else if((array_key_exists("id", $_SESSION) AND $_SESSION['id']) OR
array_key_exists("id", $_COOKIE)){
header("Location: loggedinpage.php");
}
there are no error messages, only the redirecting from the homepage to the welcome page after loging out from welcomepage