How can we destroy the session, how can we unset the variable of a session?
Posted by lampinterview on May 14, 2008
session_destroy() function destroys all data registered to current session. use unset function to destroy varible specified with session. So to destroy $name registered with session use unset($name) in your php script.



May 14, 2008 at 10:45 am
the better way of destroying a session is to first unset all
the values of $_SESSION variables individually, and then use
the session_destroy() function
May 14, 2008 at 10:46 am
session can be destroyed by using session_destroy() function and variable can be unset by unset($_session['name']).