Here is the code to reproduce the results.
Break into files named by the markers.
Then open the index page with IE (I was using version 6).
The page data on the page and in the sess file will match.
Now follow the link to page one the session data seen with
print_r will be correct, but the session data in the sess file
will have not changed. It is because of the image tag with
no image entry. Remove the image tag and refresh and the page
and the session file will match. Now replace the image tag
and refresh the page the session file will revert to it origional
value, the one stored from the index page even if you are on
page one. This does not happen with netscape or mozilla.
--------------------- constants.php --------------------
<?
define("PAGE_INDEX", 0);
define("PAGE_ONE", 1);
define("ACTION_INDEX", 0);
define("ACTION_ONE", 1);
?>
-------------------- index.php --------------------------
<?
require "constants.php";
session_start();
$SESSION["CURRENT_PAGE"] = PAGE_INDEX;
$SESSION["CURRENT_ACTION"] = ACTION_INDEX;
?>
<html>
<head>
<title>Session Error Index Page</title>
</head>
<body>
Session Error Index Page
<pre>
<? print_r($SESSION); ?>
</pre>
<br>
<a href="one.php">Session Error Page One</a>
<br>
<img src="" border="0" width="1" height="1">
</body>
</html>
----------------- one.php ----------------------
<?
require "constants.php";
session_start();
$SESSION["CURRENT_PAGE"] = PAGE_ONE;
$_SESSION["CURRENT_ACTION"] = ACTION_ONE;
?>
<html>
<head>
<title>Session Error Page One</title>
</head>
<body>
Session Error Page One
<pre>
<? print_r($_SESSION); ?>
</pre>
<br>
<img src="" border="0" width="1" height="1">
</body>
</html>