![]() |
Problem with Cookies not saving - 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: Problem with Cookies not saving (/showthread.php?tid=40172) |
Problem with Cookies not saving - El Forum - 03-31-2011 [eluser]R_Nelson[/eluser] heres the code im using to set the cookie Code: $cookie = array( if i do a phpinfo() i can see the value of 325 i have IE 8 set to except all cookies but im not seeing the cookie but other websites come thru just fine! Problem with Cookies not saving - El Forum - 03-31-2011 [eluser]InsiteFX[/eluser] in application/config/config.php change the session cookie name to cisessions IE does not like the underscore expire has to be an int not a string! Code: 'expire' => 2410000 InsiteFX Problem with Cookies not saving - El Forum - 03-31-2011 [eluser]R_Nelson[/eluser] i have tried what you suggested and im still not getting a cookie also im not getting it in firefox or chrome! Problem with Cookies not saving - El Forum - 03-31-2011 [eluser]R_Nelson[/eluser] ok i got it to work in Firefox and chrome i may have to do some looking around for IE8 Problem with Cookies not saving - El Forum - 03-31-2011 [eluser]InsiteFX[/eluser] I just tested this on my Windows 7 Pro running IE9 switched to IE8 and IE7 modes doing a refresh and the cookie shows up in my developer tools! Code: $cookie = array( InsiteFX Problem with Cookies not saving - El Forum - 03-31-2011 [eluser]R_Nelson[/eluser] i got it to work my self but its deleting the cookie when i close the browser do i have something set wrong? Problem with Cookies not saving - El Forum - 03-31-2011 [eluser]jgetner[/eluser] why not just use regular php instead of CI? this would be faster and validating a cookie is as easy as going isset(); Code: setcookie('projects' , '325' , time() + 3600); Problem with Cookies not saving - El Forum - 03-31-2011 [eluser]R_Nelson[/eluser] Thanks i got it to work i forgot the single quotes around the time now it works just fine! thx much for your time! and Jgetner that was my next step if i couldn't get this to work so thx for trying to help ![]() and as far as why use CI because get_cookie('cookie_name'); is just so much easier for me ![]() |