How to get cookies to work? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: How to get cookies to work? (/showthread.php?tid=22368) |
How to get cookies to work? - El Forum - 09-07-2009 [eluser]gh0st[/eluser] I am trying to figure out how to get cookies to work with CI, but they do not appear to work, I am wanting to store a value for later use. I am doing a basic example: Code: class Test2 extends Controller The cookie values are always empty. I have tested a PHP cookie (hard-coded) and this works fine, but the CI ones don't -- why not? How do I get cookies to work? How to get cookies to work? - El Forum - 09-07-2009 [eluser]wabu[/eluser] As a test, try setting domain => false in the code you posted and see if that works. Check out: http://us.php.net/manual/en/function.setcookie.php#73107 http://us.php.net/manual/en/function.setcookie.php#71743 |