Answers for "Which method is used to delete a session?"

2

delete session javascript

// To remove only one session
sessionStorage.removeItem('itemName'); 
// To remove all sessions 
sessionStorage.clear();
Posted by: Guest on June-18-2020
3

php delete session

session_destroy(); // To delete whole session
// OR
unset($_SESSION['myVar']); // To delete a session var
Posted by: Guest on January-24-2020

Code answers related to "Which method is used to delete a session?"

Code answers related to "Javascript"

Browse Popular Code Answers by Language