Hi all,
I have this problem and its driving me around the bend. I cant work out at all whats going on.
function session_create_guest() {
$_SESSION['userinfo']['email_address'] = "guest";
$_SESSION['userinfo']['userlevel'] = "0";
$_SESSION['userinfo']['ip'] = "{$_SERVER['REMOTE_ADDR']}";
$_SESSION['userinfo']['session_time_start'] = time();
$_SESSION['userinfo']['session_time_lastactive'] = time();
}
I have this function above which i am using to store basic info for a user when logged in.
here is the problem:- i notice that if i use the varible $userinfo anywhere in my coding it automatically inserts the value into the session array????
eg
$userinfo['email_address'] = "email@address.com";
Why is this happening? i'm still new to sessions so could be my lack of knoledge