CodeIgniter Forums
Issue with cookies - 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: Issue with cookies (/showthread.php?tid=46953)



Issue with cookies - El Forum - 11-21-2011

[eluser]Unknown[/eluser]
Hi igniters! I'm starting with CI and I got an issue with cookies (on v. 2.1). I set cookie using cookie helper function set_cookie, it looks like this:

Code:
set_cookie('permanentLogin', $id.":".$token, strtotime('+1 month'));

Cookie is set, I can access it, everything is fine, but only for actual browser session. If i close it and open it again then cookie is lost. If i vardump $_COOKIE array i see only key 'ci_session'.

Any idea how to fix it? It will be realy helpful ... thx guyz