CodeIgniter Forums

Full Version: db_session + flashdata + redirect --> drives me crazy ^^
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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.

El Forum

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