[eluser]Jay Turley[/eluser]
[quote author="Jim Higgins" date="1207106975"]I'm having a bit of trouble accessing a cookie using the Cookie Helper. After loading the helper of course, should this work?
$this->_state = 'Some State Name';
set_cookie('state_cookie', $this->_state);
echo 'Get cookie = ' . get_cookie('state');
The get cookie returns nothing. I'm not receiving any errors. I stripped everything down to the basics here.[/quote]
Just guessing, really, since I have yet to use the CI cookie functions, but shouldn't you use the same name for the retrieval as for the setting?
Code:
$this->_state = 'Some State Name';
set_cookie('state_cookie', $this->_state);
echo 'Get cookie = ' . get_cookie('state_cookie');
----------------------------------------^^^^^^^