I am having big time trouble with Codeigniter and Internet Explorer.
Please take a look at the sample page
It is something very simple afflicting me the last couple of days.
By pressing the login-button I do nothing more but calling a function start()
public function start()
{
setcookie('loginstatus', TRUE, time()+7200); // setting a cookie
redirect('stream', 'location'); // redirecting to the index controller
}
In the index-function I do the following:
public function index()
{
if ($this->isuserloggedin() == TRUE)
{
echo "The user is already logged in";
$this->load->view("v_stream_start");
} else {
echo "The user still has to login";
$this->load->view("v_stream_login");
}
}
Here's the userisloggedin() method where I check for an existing cookie:
public function isuserloggedin() {
if (isset($_COOKIE['loginstatus'])) {
return TRUE;
} else {
return FALSE;
}
}
Please check IE vs. FF/Safari/Chrome. It is working in all browsers exept IE and I have no clue why.
Everything runs as expected until I call the redirect() method - after that IE somehow can’t retreive the cookie while all other browsers can.
I already tried changing ci_session to ci_session and also checked the accurate server time.
Thanks so much for any kind of help.