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


Messages In This Thread
problem with a cookie - by El Forum - 06-27-2011, 12:16 PM
problem with a cookie - by El Forum - 06-27-2011, 01:41 PM
problem with a cookie - by El Forum - 06-27-2011, 08:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB