Welcome Guest, Not a member yet? Register   Sign In
Strange behaviour using set_flashdata and redirect
#6

[eluser]skunkbad[/eluser]
I've had some very bizarre experiences using CI's Flash Session Data. For instance, I had a javascript resource being called in the head area of my html, and it was pointing to a resource that didn't actually exist, and that was causing the flashdata to disappear. Once I removed the call to the javascript, the flashdata worked fine. I imagine that the 404 error created by the resource that didn't actually exist was using up my stored flashdata... but I'm just guessing.

In your case I think it might be worth considering that CI's flashdata is stored in a cookie, and isn't a true $_SESSION array on the server. We all know that a true $_SESSION is stored on the server, but cookies are stored on the site visitor's browser. Because the controller is never serving up a view, but rather redirecting, then the cookie is never set. You could probably verify this by using an HTTP header tool to look at what is going on.


Messages In This Thread
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 01:55 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:10 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:11 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:48 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:50 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:57 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:59 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 04:04 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 04:04 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 04:25 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 04:43 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-14-2010, 12:07 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-14-2010, 12:12 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-14-2010, 01:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB