[eluser]bevans[/eluser]
I have a new site with at login page.
When someone logs in a session should be set with the person's name as one of the session variables. If the variables are set as shown in the code below I allow the person to view stuff that only a person who is logged in can see.
The session works fine in FireFox... A person can login with no problem, but Internet Explorer (IE 7 or IE 8) does not work. Why would sessions work in FF but not IE? Any ideas for what I should check into?
The session library is auto loaded in the autoload.php file.
Here is the code that should do the trick:
Code:
$session_data = array(
'logged_in' => 'Yes',
'profile_id' => "$profile_id",
'first_name' => "$first_name",
'access' => "$accesslevel"
);
$this->session->set_userdata($session_data);
And this is the code that should check to see if they session is good and if the person is logged in:
Code:
if(($this->session->userdata('logged_in') == 'Yes') && (($this->session->userdata('access') == 'user') || ($this->session->userdata('access') == 'admin')))
{
return true;
}
else
{
return false;
}
Thanks in advance,
Branden