CodeIgniter, Cookies, and IE9 (oh my!): Underscores in cookie name fails in IE9
Comment are off
I just ran into a scenario where I implemented a Remember Me checkbox on a login page (powered by CodeIgniter). Turns out that if you use CodeIgniter Cookies and you have an underscore in the cookie name, that IE9 has a fit and won’t let you login.
So my login controller had something like this in it…
$this->load->helper('cookie'); $this->data['remember_email'] = ''; if (get_cookie('site_remember') != '') { $this->data['remember_email'] = get_cookie('site_remember'); }
The simple fix was to remove the underscores from the cookie name and it worked great.