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


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to