Currently i am using codeigniter3 which i am storing my session driver in database.
Session should not destroy on browser close.
When user clicks the logout button only then should the session get destroyed.
How to achieve it in codeigniter3?
Please give me any solutions.
This is my config file
$config['sess_driver'] = 'database';
$config['sess_use_database'] = TRUE;
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 0;
$config['sess_regenerate_destroy'] = FALSE;
In the previous version, Codeigniter had sess_expire_on_close
in the config file but now they have removed it.
https://codeigniter.com/user_guide/libraries/sessions.html