session_destroy() problem.

From: Date: Tue, 01 Oct 2002 03:59:16 +0000
Subject: session_destroy() problem.
Groups: php.db 
Request: Send a blank email to php-db+get-22120@lists.php.net to get a copy of this message
Ok. What is the best way to destroy a session. I have a logout page which is supposed to destroy the session but it doesn't seem to be working. After the user logs out they are take back to the log in page, which is all fine and good. But if the user tries to go to a restricted page they are let in. This is the code for my logout page. session_start(); setcookie(session_name(),"","","/"); session_unset(); session_destroy(); header("Location: index.php"); any ideas? //Ryan

« previous php.db (#22120) next »