Session problem! PLS help! - 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: Session problem! PLS help! (/showthread.php?tid=27570) |
Session problem! PLS help! - El Forum - 02-15-2010 [eluser]bogdan3l[/eluser] Hello! I have a problem with the ci session library in internet explorer 6-7(8 not tested). I give you a quick example what i want to do. ========================================================================================== class Welcome extends Controller { function __construct() { parent::Controller(); $this->load->helper('url'); $this->load->library('session'); } function index() { echo $this->session->flashdata('test'); } function blabla() { $this->session->set_flashdata('test', 'Hello world!'); redirect(''); } } ========================================================================================== Ok, in other browsers everything is ok (when i access http://localhost/welcome/blabla i am redirected to http://localhost/ and i see the Hello world!). In IE 6-7 i am redirected to http://localhost/ but i don't see the Hello world! but, if i give a refresh to the page then i see the Hello world!. Could someone help me to solve this? Please! I am stuck with my project. Thank you! Session problem! PLS help! - El Forum - 02-15-2010 [eluser]xeroblast[/eluser] try using redirect('','refresh')... Session problem! PLS help! - El Forum - 02-15-2010 [eluser]bogdan3l[/eluser] Thank you for your reply. Your method is working but, only first time. If i access http://localhost/welcome/test i see the Hello world! but if i access again http://localhost/welcome/test i don't see the Hello world!. Thank you again! Session problem! PLS help! - El Forum - 02-15-2010 [eluser]xeroblast[/eluser] i dont know about that but i think bcoz youre using session flashdata... try another one... not the flashdata... Session problem! PLS help! - El Forum - 02-15-2010 [eluser]bogdan3l[/eluser] Thank you for you reply. I will try right now. Session problem! PLS help! - El Forum - 02-15-2010 [eluser]brooky_agb[/eluser] I've had the same problem for weeks.. No solution found. Session problem! PLS help! - El Forum - 02-15-2010 [eluser]bogdan3l[/eluser] I can't test your second method because i want the message to be shown only one time. In test function i do: ============================================================================================= $this->session->set_userdata('test', 'Hello world!'); redirect('/welcome'); And in index function: ============================================================================================= echo $this->session->userdata('test'); But then i can't remove de Hello world!. If i do $this->session->sess_destroy(); i get the header error, the same for unset_userdata. Thank you again for your reply. |