note 106924 deleted from features.sessions by tularis
| From: | tularis@php.net | Date: | Mon, 19 Dec 2011 19:40:02 +0000 |
| Subject: | note 106924 deleted from features.sessions by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-185155@lists.php.net to get a copy of this message | ||
Note Submitter: Johnny
Reason: useless
----
Here is a the basic structure of the SESSIONs in PHP:
Start a session and initialize it:
<?php
session_start();
$_SESSION['visitors']=1;
?>
<html>
<body>
<?php
echo "Nr of visitors=". $_SESSION['visitors'];
?>
</body>
</html>
to free a specified session variable use:
<?php
unset($_SESSION['visitors']);
?>
and this one if you want to destroy it for good:
<?php session_destroy(); ?>
hope it helps!!