Though this question has multiple duplicates i could not find proper solution for me. Need Some help.
I have used ini_set(\'session.cookie_lifetime\', 0);
ini_set(\'session.cookie_lifetime\', 0);
This might help you,
session_set_cookie_params(0); session_start();
Your session cookie will be destroyed... so your session will be good until the browser is open. please view http://www.php.net//manual/en/function.session-set-cookie-params.php this may help you.