![]() |
flashdata problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: flashdata problem (/showthread.php?tid=1883) |
flashdata problem - El Forum - 07-03-2007 [eluser]kisin[/eluser] i have a strange problem - im using db session and when im using the set_flashdata method i see the data only after i refresh my page twice. for example, i use flashdata in my login form when the login falied but the flashdata is only seen on the screen in the second time the login falied. any ideas what the problem can be or from where to start looking? flashdata problem - El Forum - 07-04-2007 [eluser]Grahack[/eluser] I would be sure if I had your source code, but what often happens is that people code Code: if ($ok) {ok_processing();} Code: if ($ok) {ok_processing();} flashdata problem - El Forum - 07-04-2007 [eluser]kisin[/eluser] you are right - that was the problem. flashdata problem - El Forum - 09-05-2007 [eluser]worchyld[/eluser] Thank for this grahack -- for some reason if you use: Code: // Uses the OBSession library as found in http://codeigniter.com/wiki/OB_Session/ and http://bleakview.orgfree.com/obsession/ You have to reload the page, sometimes twice, but if you redirect the page, ala: Code: redirect('mypage'); Everything works fine! flashdata problem - El Forum - 09-05-2007 [eluser]Grahack[/eluser] The reason is flashdata "will persist only for the next request", maybe we could add "and not before it". [url="http://codeigniter.com/wiki/Native_session/"]see here[/url] flashdata problem - El Forum - 09-05-2007 [eluser]Crimp[/eluser] The OB_Session implementation of flashdata has been included in the CI core by Derek Allard. If you download CI from SVN, you can avoid using another Session library. |