I'm trying to destroy a session, and then, should the user visit the same page again, regenerate a new session with a different ID. I thought that if I destroyed a session, this is what would happen automatically. Wrong?
In any event, I've been trying to destroy my session in everyway imaginable with this code:
setcookie(session_name(), '', time() - 3600, '/');
setcookie(session_id(), '', time() - 3600, '/');
session_unregister($_SESSION['SID']);
$_SESSION=array();
unset($_SESSION);
session_write_close();
session_destroy();
But everytime I revisit my initial form page, all of my data is still there. I'm not sure I understand why I can't destroy the session.
Can someone explain?