I am having problems passing session variables all of the sudden and I don't know what I'm doing wrong. See my test code below for createSession.php and passingSession.php. I can create the session ok on createSession.php but when I click the link to see if the session is passing to passingSession.php, the session is now empty.
Note: session_start() is the very first thing on each page. No leading white space of any kind.
createSession.php
session_start();
$_SESSION['aID'] = time();
if($_SESSION['aID']==""){
echo "Session is empty. There is a problem creating sessions";
}else{
echo "Session = ".$_SESSION['aID']." There is no problem creating sessions. <a href='passingSession.php'>Click Here</a> to see if sessions are passing ok.";
}
passingSession.php
session_start();
if($_SESSION['aID']==""){
echo "Session is empty. There is a problem passing sessions.";
}else{
echo "Session = ".$_SESSION['aID'].". Passing sessions is ok.";
}