• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with passing variable from controller to view

#2
[eluser]Unknown[/eluser]
Session flashdata is available for the next server request that is made. From your code you are setting the flashdata and then loading the view not redirect or reloading the page you intend to view.

From the docs

Quote:CodeIgniter supports "flashdata", or session data that will only be available for the next server request, and are then automatically cleared. These can be very useful, and are typically used for informational or status messages (for example: "record 2 deleted").

So in short you'll either need to redirect back to your controller method and show the flashdata there or just pass the validation error messages direct to the view with a normal variable.


Messages In This Thread
Problem with passing variable from controller to view - by El Forum - 03-06-2012, 09:04 PM
Problem with passing variable from controller to view - by El Forum - 03-07-2012, 02:04 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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