Here is some very simple code for sessions
ini_set('session.cookie_lifetime', 0);
session_start();
echo session_id();
var_dump($_SESSION);
$_SESSION["name"] = "test";
I load the page once.
I then comment out
#$_SESSION["name"] = "test";
I hit reload and can the $_SESSION variables.
If I completely close the browser and start it up, I expect the $_SESSION variable to be completely empty.
Instead I see that "name" is still part of the $_SESSION variable.
Please alter this code so that it empties the $_SESSION if I close the browser. When I open it again, the $_SESSION variable should be empty.