我正在創建一個網站,登錄和註銷,並註冊,但每次我想註銷時出現錯誤如何解決它我認爲eroor是在會話中這個錯誤讓我發瘋我做了很多關於解決問題的搜索,但我沒有得到任何幫助我的解決方案。php mysql +會話登出錯誤
logout.php
<?php
session_start();
session_destroy();
if(isset($_COOKIE['id_cookie'])){
setcookie("id_cookie", "", time()-50000,"/");
setcookie("pass_cookie", "", time()-50000,"/");
}
if(isset($_SESSION['username'])){
echo("we could not log out try again!");
exit();
}else{
header("Location: home.php");
}
?>
嗯,有什麼錯誤? – 2013-02-24 01:08:23
這個例子可能是有用的:http://stackoverflow.com/questions/3512507/proper-way-to-logout-from-a-session-in-php/3512570#3512570 – 2013-02-24 01:09:31