Right now, i’m rather po’d with this logout script. It was working, and now its not. All i’ve done is add 2 more cookies. I’ve read through countless posts on destroying cookies. most say to just set the time to something in the past, but its not working anymore. I’ve been at this for several hours now, i’m tired and not all that happy right now since i can’t test another script change i was working on for another project.
anyways, this is what i have currently:
[php]if($_GET[‘do’] == “logout”) {
$_SESSION = array();
$_COOKIE = array();
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 42000,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]);
}
session_destroy();
foreach($_COOKIE AS $val) {
setcookie($val,'', time()-60*60*24*30, '/', '.venzodigital.com');
}
header("Location: index.php");
}[/php]
The sessions are being destroyed but reset again because the cookes aren’t being erased like they should be.
this is my original logout file
[php]session_destroy();
setcookie(“user”,"",mktime(12,0,0,1, 1, 1990), “/”, “.venzodigital.com”);
setcookie(“pass”,"",mktime(12,0,0,1, 1, 1990), “/”, “.venzodigital.com”);
setcookie(“id”,"",mktime(12,0,0,1, 1, 1990), “/”, “.venzodigital.com”);
// these 2 are what was added
setcookie(‘itunes’,"",mktime(12,0,0,1, 1, 1990), ‘/’, ‘.venzodigital.com’);
setcookie(‘apps’,"",mktime(12,0,0,1, 1, 1990), ‘/’, ‘.venzodigital.com’);
header(“Location: index.php”);[/php]
So now its not working and i have no clue as to why. Could use some help here!