Hello,
I have a question regarding PHP's built in (using cookies) sessions. I understand how to start a session and then have session variables available to all subsequent pages. However, I'm having trouble closing the session manually (logging out.)
I have a 'LogOut' link opening logout.phtml. The following code is located in the first part of that file:
<?php
session_start();
session_unset();
session_destroy();
?>
This code does erase all session variables, and appears to end the session on the server (the session file is removed.) The problem arises when I press the back button, the session file gets recreated and things progress as if I never logged out.
What is the "right" way to end a session? Thanks.