Start PHP Session
Before you can store user information in a PHP session, you must first start a session
<?php session_start(); ?>
Store Session Variables
<?php $_SESSION['UserName']='gqink'; ?>
Retrieve Session Variables
<?php echo $_SESSION['UserName']; ?>
Delete Session
<?php unset($_SESSION['UserName']); ?>
Completely Destroy the Session
<?php session_destroy(); ?>
session_destroy() will reset the session, and you will lose all stored session data