Welcome Guest, Not a member yet? Register   Sign In
different cookie handling IE vs. firefox/chrome/safari
#1

[eluser]kbroich[/eluser]
Hi guys,

I am starting with Codeigniter and I am not sure if my issue has something to do with CI or if it is a general misunderstanding of HTTP.

The thing that confuses me is that a login process leads to different results in Internet Explorer vs. Safari/Chrome/Firefox.

Please take a look at the demo (You can enter whatever u want in the form)

What am I doing?

I render a form which takes an email and a password and creates a new user:
Code:
$this->exampleuser->create($this->input->post('email'), $this->input->post('password'));

I also set a cookie to make sure that I am able to see that the user is already logged in when the page is refreshing or he/she comes back.

Code:
setcookie('loginstatus', TRUE);

After that I redirect to the start page

Code:
redirect('stream');

to see if the user is logged in or not:

Code:
if ($this->exampleuser->isloggedin() == 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");
}

In FF/Chrome/Safari it works without problems. But for some reason the Internet Explorer has trouble retreiving the cookie in the
Code:
$this->exampleuser->isloogedin()
method.

In there I do nothing more than
Code:
public function isloggedin()
{          
   return $this->input->cookie('loginstatus');
}

When I var_dump the retreived cookie in Internet Explorer it says bool(false) while in all other browsers there's a "1" in there.

Does anybody have an idea what part I am missing?

Thank u all in advance!




Messages In This Thread
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-02-2012, 03:33 PM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-02-2012, 10:29 PM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-03-2012, 01:06 AM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-03-2012, 02:58 AM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-03-2012, 01:46 PM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-04-2012, 11:18 PM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-05-2012, 09:39 AM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-05-2012, 11:59 AM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-05-2012, 12:40 PM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-05-2012, 04:03 PM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-05-2012, 04:55 PM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-05-2012, 05:19 PM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-05-2012, 07:19 PM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-05-2012, 10:22 PM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-06-2012, 03:37 AM
different cookie handling IE vs. firefox/chrome/safari - by El Forum - 07-06-2012, 07:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB