• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
flashdata: [flash:old:message] being displayed

#1
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
Reply

#2
Mike, I am having the same problem. Did you find a solution to this? Thanks.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.