php - Need destroy session after close browser tab not whole browser -


this question has answer here:

i need destroy session after page closed in browser. tried unset $_session['value']; can not working destroy current page need destroy after closed in browser

you can write this

session_set_cookie_params(0); session_start(); 

this destroy session when browser closed.


Comments

Popular posts from this blog

ios - Is 'init' forbidden as *part* of a variable name? -

c# - Get the Class name in a class with atribute inside a attribute method -

file - Python: AttributeError: 'str' object has no attribute 'readlines' -