Answers for "how to unset session variable php"

PHP
6

php unset session variable

// Destroy a sesion variable name 'variable_name' 
<?php
unset($_SESSION['variable_name']);
?>
Posted by: Guest on April-25-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 "how to unset session variable php"

Browse Popular Code Answers by Language