Session problem! PLS help! |
[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!
[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!
[eluser]xeroblast[/eluser]
i dont know about that but i think bcoz youre using session flashdata... try another one... not the flashdata...
[eluser]brooky_agb[/eluser]
I've had the same problem for weeks.. No solution found.
[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. |
Welcome Guest, Not a member yet? Register Sign In |