Coba fungsi logout seperti ini... function logout() { session_start(); $_SESSION = array(); session_destroy(); }