Hi,
I am new to sessions and they seem to be working but it appears that after a few pages the variables disappear. What do I need to be looking out for here?
I tried putting session start(); at the top of every page but its not working. Do I also need to redeclare the variables on every page? Will it lose these variables if I don't? I think I tried adding
<$php
session_start():
$loginName = $_SESSION['loginName'];
?>
to every page but on a few pages if i echo $loginName it is blank.
On this scenario, if I have the above code on the top of the page, and then later in the script I pull $loginName from a DB, and then on the next page I have the above code again, wouldnt it default to use the session variable?
Any hints would be appreciated.