SyntaxFix
Write A Post
Hire A Developer
Questions
Actually, it works, but you also need to do $_SESSION = array(); after the session_destroy to get rid of $_SESSION variables. However, avoid doing unset($_SESSION) because that makes sessions useless.
$_SESSION = array();
unset($_SESSION)