Answers for "session remove"

PHP
6

session unset

// Destroy a sesion variable name 'variable_name' 
<?php
unset($_SESSION['variable_name']);
?>
Posted by: Guest on April-25-2020
2

remove session storage

sessionStorage.removeItem('key');
Posted by: Guest on June-18-2021
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
5

destroy session php

<?php 
 session_start(); // start session
 session_destroy();  // Delete whole session
// OR
unset($_SESSION['username']); // delete any specific session only
?>
Posted by: Guest on June-15-2020
3

clear session php

<?php
   unset($_SESSION['counter']);
?>
Posted by: Guest on June-30-2020

Browse Popular Code Answers by Language