Welcome Guest, Not a member yet? Register   Sign In
problem with a cookie
#1

[eluser]nourdine[/eluser]
hello

I am setting a cookie in a certain controller and then trying to retrieve it in another one. To set it I do:

Code:
$this->input->set_cookie(array(
          "name" => "user_email",
          "value" => $this->loginAttempt->getEmail(),
          "expire" => "3600", // 1 hour!
          "secure" => true
      ));

which works fine as firebug is concerned. The cookie "user_email" is there and I can see it!

But when I move to the new action (a different page basically) I cannot retrieve it and I get a FALSE when I do:

Code:
$email = $this->input->cookie("user_email");
var_dump($email);

which is weird cuz as in this new page too, firebug is still able to see the cookie.

Anybody??

cheers
#2

[eluser]nourdine[/eluser]
Sorry guyz can you at least confirm that cookies are working in CI?
#3

[eluser]Nick_MyShuitings[/eluser]
yes cookies do work... I've just tried a similar example in my reactor 2.0.2 and it works like a charm... do you have a test link perhaps?




Theme © iAndrew 2016 - Forum software by © MyBB