[eluser]Solarpitch[/eluser]
...Possibly. I cant figure this out at all. I dont think sessions is well documented in the user guide for a start. I'm setting a session in one function in my controller, then simply trying to get the value of it in another... but it's empty.
However it works when I set and retrieve the session in the same function which doesn't make sence.
Code:
function report_charts(){
$this->load->library('session');
$date = $this->session->set_userdata('chart_set_date', '20090106');
}
function graph(){
$this->load->library('session');
$this->load->model('report_model');
$this->load->helper('graph');
//call the session ans pass the value to the model. The value is empty
$date = $this->session->userdata('chart_set_date');
$sales_breakdown_chart = $this->report_model->sales_breakdown_chart($date);
$date = "20090106";
}
Settings...
Code:
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'sessions';
$config['sess_match_ip'] = TRUE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;
$config['cookie_prefix'] = "";
$config['cookie_domain'] = ".mysite.com";
$config['cookie_path'] = "/";
$config['base_url'] = "http://mysite.com/enterprise/";