Jump to content
Larry Ullman's Book Forums

Recommended Posts

Not sure if I am getting this, I followed along and still I am seeing the PHPSESSID

here is the code <?php // Script 9.8 - logout.php



* Session ID is still present

* I am using a Edit this Cookie

* A Chrome Add On for working with

* Cookies, still seeing the

* PHPSESSID | localhost


// Need the session


// Delete the session variable


// Reset the session array

$_SESSION = array();



// Define the page title and include the header

define('TITLE', 'Log Out!');



echo '<h2>Log Out Page!</h2>';




Why am I still seeing the session ID ?


Thanks so much! :rolleyes:

Link to comment
Share on other sites

You're still seeing the session ID cookie because the code isn't deleting the cookie itself. That's an extra step you could take. This code just wipes out the data on the server. If you went to another page, the same session ID would be used (because the cookie's still there), but there would be no session data.

  • Upvote 1
Link to comment
Share on other sites


  • Create New...