![]() |
return cookie value - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: return cookie value (/showthread.php?tid=50723) |
return cookie value - El Forum - 04-05-2012 [eluser]ibnclaudius[/eluser] I'm setting the cookie like this: Code: $cookie = array( And returning it's value like this, but it output nothing: Code: get_cookie($this->remember['name']) What is wrong? return cookie value - El Forum - 04-05-2012 [eluser]Denzel[/eluser] Please provide us with a little bit more information. First, what exactly do you mean by "output nothing." That appears to be the expected behavior from a fleeting glance at your code; there are no statements made that output anything. I don't know what you intended, maybe it was just a typo, but you are calling setcookie, PHP's built-in function, not set_cookie, CodeIgniter's alias for Input: ![]() Provide some more context so we can help you better. return cookie value - El Forum - 04-06-2012 [eluser]ibnclaudius[/eluser] Running: Code: echo get_cookie($this->remember['name']) I want to set a cookie and check if it exists and returns it value... return cookie value - El Forum - 04-06-2012 [eluser]ibnclaudius[/eluser] I'm doing this, if the user login with the remember me checked, create a cookie and insert it in database, the database part is ok, but I don't if the cookie is being set. ![]() Code: public function login($email, $password, $remember) So, when the user logout, delete his session and if there's a cookie, delete it and from the database, but again, everything works, except the cookie part, it's not deleted, also from the database... I don't know if the cookie is being set.. Code: public function logout() Sorry for the english ![]() return cookie value - El Forum - 04-06-2012 [eluser]InsiteFX[/eluser] This should be FALSE! Code: 'secure' => FALSE Only set to true if your running the server in SSL secure! |