Welcome Guest, Not a member yet? Register   Sign In
Problem with flashdata
#7

[eluser]jedd[/eluser]
Well, the CI User Guide (in the [url="http://localhost/devel/ci_user_guide/libraries/sessions.html"]Session Library[/url] page makes it quite clear:

Quote:CodeIgniter supports "flashdata", or session data that will only be available for the next server request, and are then automatically cleared

So, you need to keep the data using the keep_flashdata() function, and the best place to do that would be immediately before the redirect. You could check if it exists already, but I think a keep_flashdata against non-existent data works just as well (ie. doesn't report any errors) - so it might be faster to just do the keep all the time. Your call on performance/elegance there.

EDIT: alternatively, use real session data rather than flashdata - you'd have to manage your session data sensibly there, culling it when done, checking age and validity before usage, etc - but it might turn out to be a neater approach.


Messages In This Thread
Problem with flashdata - by El Forum - 08-16-2009, 05:47 AM
Problem with flashdata - by El Forum - 08-16-2009, 06:12 AM
Problem with flashdata - by El Forum - 08-16-2009, 06:15 AM
Problem with flashdata - by El Forum - 08-16-2009, 06:17 AM
Problem with flashdata - by El Forum - 08-16-2009, 06:23 AM
Problem with flashdata - by El Forum - 08-16-2009, 06:32 AM
Problem with flashdata - by El Forum - 08-16-2009, 08:04 AM
Problem with flashdata - by El Forum - 08-16-2009, 03:16 PM
Problem with flashdata - by El Forum - 08-16-2009, 04:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB