![]() |
ask:setcookie in codeigniter - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: ask:setcookie in codeigniter (/showthread.php?tid=52954) |
ask:setcookie in codeigniter - El Forum - 07-03-2012 [eluser]Unknown[/eluser] hy all, I am still newbie in using codeigniter framework, I get a problem when I am using setcookie function in codeigniter in this function I use setcookie but it does not work, I mean the cookie return "bool(false)" not return the value that put in the cookie Code: function login_verivication1(){ but when I try like this, it work properly, Code: public function index() I don't know whats wrong with this, can anyone suggest solution for this? I appreciate every help and suggestion. thank you ask:setcookie in codeigniter - El Forum - 07-04-2012 [eluser]InsiteFX[/eluser] Because it thinks your trying to pass an array to it when it is expecting a string value. Code: setcookie('loginok',$database['id']); You can pass arrays to setcookie but the have to serialized and then un-serialized so that it is a string. |