![]() |
$this->session->set_flashdata inserting the wrong data. - 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: $this->session->set_flashdata inserting the wrong data. (/showthread.php?tid=58759) |
$this->session->set_flashdata inserting the wrong data. - El Forum - 07-16-2013 [eluser]Unknown[/eluser] Look at this code: Code: $this->session->set_flashdata('prev_page', $this->uri->uri_string()); When visiting mywebsite/index.php/home/ Code: echo $this->uri->uri_string(); Code: echo $this->session->flashdata('prev_page'); The controller functions in question: Code: class Home extends MY_Controller { Why could this be happening? $this->session->set_flashdata inserting the wrong data. - El Forum - 08-14-2013 [eluser]karael[/eluser] Try without using index if it doesn't work. Just like this: Code: public function index() $this->session->set_flashdata inserting the wrong data. - El Forum - 08-14-2013 [eluser]jairoh_[/eluser] from what i know and experienced, you can retrieve the right value of flashdata when you redirect to a url then call it. |