I am using a session variable to track the status of a user's actions like this.
if ($SESSION['mtype'] == '0' || $SESSION['mtype'] < '0')
{
$SESSION['action']='new';
//echo $SESSION['action']."=Act on credit m=0||<0<br>";
$SESSION['pay']= $POST['paytype'];
$SESSION['amt']=$POST['amount'];
header("Location: login.php");
}
This directs to a login so users can login to the site or register.
Naturally, when I put the echo in which is commented out I did not get to the header location but the echo did indicate the action was 'new'.
I closed the browser to remove cookies and session data and started again. (After commenting out the echo). Upon arriving at the login.php this was echoed from the other script on page load.
old=Action at login.php start
Old is the default.
Why would the var change. there is no code between the header command and the login page.