TonyB Posted March 18, 2012 Share Posted March 18, 2012 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 session_start(); // Delete the session variable unset($_SESSION); // Reset the session array $_SESSION = array(); session_destroy(); // Define the page title and include the header define('TITLE', 'Log Out!'); require('_includes/header.html'); echo '<h2>Log Out Page!</h2>'; require('_includes/footer.html'); ?> Why am I still seeing the session ID ? Thanks so much! Link to comment Share on other sites More sharing options...
Larry Posted March 19, 2012 Share Posted March 19, 2012 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. 1 Link to comment Share on other sites More sharing options...
TonyB Posted March 19, 2012 Author Share Posted March 19, 2012 I see okay, by the way I love the book Larry, I am really learning PHP! Link to comment Share on other sites More sharing options...
Larry Posted March 19, 2012 Share Posted March 19, 2012 Thank you very much. I'm glad to hear it! Link to comment Share on other sites More sharing options...
Recommended Posts