CodeIgniter Forums
db_session + flashdata + redirect --> drives me crazy ^^ - 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: db_session + flashdata + redirect --> drives me crazy ^^ (/showthread.php?tid=8347)



db_session + flashdata + redirect --> drives me crazy ^^ - El Forum - 05-14-2008

[eluser]davidbehler[/eluser]
ok guys, i have the following problem:

in a controller i use something like this:
Code:
$this->db_session->set_flashdata('session_notice', 'Message blah blah');
header("location: ".$this->config->site_url()."/thiscontroller/thisfunction");
but the data is not saved to my session/db and therefore can not be retrieved to be displayed in my view after the redirect

but if i use the same code but redirect not to "/thiscontroller/thisfunction" but e.g. just "/thiscontroller/" or "/thiscontroller/anotherfunction" or "/anothercontroller/" the data is set and saved to my session/db

anyone got a clue why this is happening? it's kinda like driving me crazy right now that i just can't get it to work...i'm really stuck here.


db_session + flashdata + redirect --> drives me crazy ^^ - El Forum - 05-14-2008

[eluser]davidbehler[/eluser]
can any mod plz delete this topic?...i guess i have been awake for to long...works fine now...