I have a problem with session. If I use session variables in two scripts and I go ahead and back changing this values, the browser seems always to remember the first values assigned.
Look, what's worng in this scripts?
provases1.php:
<?php
session_cache_limiter("nocache");
session_start();
if(!session_is_registered("errori")){
session_register("errori");
$HTTP_SESSION_VARS["errori"];
}
$HTTP_SESSION_VARS["errori"]++;
echo $HTTP_SESSION_VARS["errori"];
echo "<a href=\"provases2.php\">back</a>";
?>
provases2.php:
<?php
session_cache_limiter("nocache");
session_start();
$HTTP_SESSION_VARS["errori"]++;
echo $HTTP_SESSION_VARS["errori"];
echo "<a href=\"provases1.php\">back</a>";
?>
I wanted to have numbers incrementing everytime push the link "back". Without the cache limiter values bounce between 1 and two. With cache limiter only provases1.php increments the value. Why?