I'm having trouble getting some cookies deleted.
I'm storing login data in the session, and setting a two-week loginID
cookie to bypass the need to login again upon later visits. The logout
script uses the following code to destroy the session (which works) and
to attempt to delete the session and loginID cookies. But that is not
working, and those cookies are still alive if the user navigates away
from the logout page to another page, so she is automatically logged
right back in just as if she were coming back a week later.
================
session_start();
$_SESSION = array();
setcookie( session_id(), '', time() - 3600 );
session_destroy();
setcookie( 'loginID', '', time() - 3600 );
================
What am I doing wrong?
--
=================
Michael Southwell
Vice President, Education
NYPHP TRAINING: http://nyphp.com/Training/Indepth
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php