Hi I'm trying to clear all the session variables when the user closes the tab, I have tried the following
session_set_cookie_params(0);
session_start();
but it clears the session only when the user closer the entire browser, I have tried searching frome some links but I have found that not working.