TonyB 0 Posted March 18, 2012 Report 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! Quote Link to post Share on other sites
Larry 433 Posted March 19, 2012 Report 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 Quote Link to post Share on other sites
TonyB 0 Posted March 19, 2012 Author Report Share Posted March 19, 2012 I see okay, by the way I love the book Larry, I am really learning PHP! Quote Link to post Share on other sites
Larry 433 Posted March 19, 2012 Report Share Posted March 19, 2012 Thank you very much. I'm glad to hear it! Quote Link to post Share on other sites
Recommended Posts
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.