Delete session variable : Session Variables Delete : Cookie Session PHP Source Code


PHP Source Code » Cookie Session » Session Variables Delete »

 

Delete session variable




<?php

   session_start();

   $_SESSION['username'] "Joe";
   echo "Your username is: ".$_SESSION['username'].".<br />";
   
   /* Delete the session variable. */
   unset($_SESSION['username']);

   /* Demonstrate that session variable is indeed gone. */
   echo "Username now set to: ".$_SESSION['username'].".";

?>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Cookie Session
» Session Variables Delete