Welcome Guest, Not a member yet? Register   Sign In
db_session + flashdata + redirect --> drives me crazy ^^
#1

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

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




Theme © iAndrew 2016 - Forum software by © MyBB