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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...