CodeIgniter Forums
Cookie problem - 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: Cookie problem (/showthread.php?tid=28062)



Cookie problem - El Forum - 02-28-2010

[eluser]ssloxing[/eluser]
Hey!, I've got a problem with cookies :/.

The question:
How am I going to set a cookie on my localhost (wamp).
My code for that now:
Code:
$cookie = array(
    'name' => 'cookie',
    'value'  => 'cookievalue',
        'expire' => '86500',
        'domain' => '.localhost',
        'path'   => '/',
    );
    set_cookie($cookie);

then I echo it out with this code:
Code:
echo $this->input->cookie('cookie');
When I echo this out it ain't displaying anything Sad
Shouldn't that work?



EDIT: Fixed it in some way, just worked suddenly :/ Smile