Fernanditos
asked on
Sessuin Variable access - Question
Hi,
I have the attached code which is working fine and print the right Session value.
the problem is when I try to access to the session value from another page on my site:
<?php echo $_SESSION['logged']; ?> always return YES. even if the value is NO.
What is wrong here?
I have the attached code which is working fine and print the right Session value.
the problem is when I try to access to the session value from another page on my site:
<?php echo $_SESSION['logged']; ?> always return YES. even if the value is NO.
What is wrong here?
<?php
session_start();
include('/home/eagle/public_html/board/global.php');
if($vbulletin->userinfo['userid'] > 0){
$_SESSION['logged'] = 'yes';
} ELSE {
$_SESSION['logged'] = 'no'; }
?>
<?php echo $_SESSION['logged']; ?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
show us an example of the "other" page where you are trying to access the session var. Do you also have a session_start() on that page?