Welcome Guest, Not a member yet? Register   Sign In
flashdata won't work with redirects
#1

[eluser]predi[/eluser]
flashdata won't work with redirects even if keep_flashdata is used. Why?

this is the main view class:

Code:
public function index()
{
   // this end up with an empty string like "message ="
   die('message = '.$this->session->flashdata('message'));
}

public function activate()
{
   $this->session->flashdata('message', 'Activated!');
   $this->session->keep_flashdata('message');
   redirect(''); // this will redirect to the index method
}

Why not working?! I'm using db for storing sessions.
here's my config:

Code:
$config['sess_cookie_name']  = 'mysamplesess';
$config['sess_expiration']  = 0;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name']  = 'sessions';
$config['sess_match_ip']  = FALSE;
$config['sess_match_useragent'] = FALSE;
$config['sess_time_to_update'] = 300;


Messages In This Thread
flashdata won't work with redirects - by El Forum - 07-26-2012, 10:19 AM
flashdata won't work with redirects - by El Forum - 07-26-2012, 10:27 AM
flashdata won't work with redirects - by El Forum - 07-28-2012, 12:18 PM
flashdata won't work with redirects - by El Forum - 07-30-2012, 08:19 AM
flashdata won't work with redirects - by El Forum - 08-03-2012, 07:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB