enriqueloris
New Member
Currently I have this script, logout.php \[code\]setcookie("id", "", $expireTime, $dirPath);setcookie("email", "", $expireTime, $dirPath);setcookie("password", "", $expireTime, $dirPath);session_destroy();header("location: index.php");exit();\[/code\]obviously I have dynamic variables in there and it works great!However, can you guys help me out to improve this script?For instance, set all cookies empty and then check if the value still exist:if setcookie fails and the value still true/not erased, { echo fail to logout || force_destroy(theCookie) }else header location index // <-- normal & easy //Also, make sure to kill any session and other things I don't know yet.Thanks.