krahny
New Member
- Messages
- 25
- Reaction score
- 0
- Points
- 0
I have a session variable set on one page, and I know it gets set because it works for that page, but whaen I go to a new page, it seems as though it's not set.
Here's the code that sets the variable:
session_start();
$_SESSION['logging']=$_POST['username'];
Here's the code that's on both of the pages, but only writes the cookie on the first one:
if(isset($_SESSION['logging'])){
echo $_SESSION['logging'];
}
Could someone please help?
Here's the code that sets the variable:
session_start();
$_SESSION['logging']=$_POST['username'];
Here's the code that's on both of the pages, but only writes the cookie on the first one:
if(isset($_SESSION['logging'])){
echo $_SESSION['logging'];
}
Could someone please help?