delete_session_variable.php : _SESSION « Cookie Session « PHP






delete_session_variable.php

 
<?php
   session_start();
   $_SESSION['username'] = "jason";
   echo "Your username is: ".$_SESSION['username'].".<br />";
   unset($_SESSION['username']);
   echo "Username now set to: ".$_SESSION['username'].".";
?>
  
  








Related examples in the same category

1.Count Visits with session
2.Counting page accesses with a session
3.Implementing Sessions
4.Printing session data
5.Registering a variable by including it in $_SESSION
6.Session based counter
7.Session preferences
8.Session using the proper $_SESSION super global
9.Verifying session info
10.check for a valid login in sessions
11.create_session_variable.php
12.Doing something special for a logged in user
13.Setting Up Cookie Authentication