![]() |
flashdata: [flash:old:message] being displayed - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: flashdata: [flash:old:message] being displayed (/showthread.php?tid=65090) |
flashdata: [flash:old:message] being displayed - MikeAnderson - 04-27-2016 Hello: I'm using CodeIgniter on OpenShift, I think it may be 2.2.1. In my controller I using: $this->session->set_flashdata('message', 'message X'); $this->load->view('viewpage'); In my view I'm using: print_r ($this->session->userdata); echo $this->session->flashdata('message'); Here are my observations: first time through the controller/load view, I see nothing echoed with the $this->session->flashdata('message'); I see this with the print_r [flash:new:message]=>message 1 second time through the controller/load view, I see "message 1" being echoed I see this with the print_r [flash:old:message] =>message 1[flash:new:message]=>message 2 So what appears to be happening is that [flash:old:message] is being displayed instead of [flash:new:message]. If [flash:old:message] isn't set, then nothing is displayed. Please help. Cheers, Mike RE: flashdata: [flash:old:message] being displayed - darioism - 06-04-2017 Mike, I am having the same problem. Did you find a solution to this? Thanks. |