<?php
// Initialize the session.
session_start();
//store values
$_SESSION['favcolor'] = 'green';
$_SESSION['animal'] = 'cat';
$_SESSION['time'] = time();
//print stored values
echo $_SESSION['favcolor']; // green
echo $_SESSION['animal']; // cat
echo date('Y m d H:i:s', $_SESSION['time']);
// Unset all of the session variables.
$_SESSION = array();
// Finally, destroy the session.
session_destroy();
?>

Thanks yaar, thats useful for me. Am a asp programmer now want to shift to php. do u know any best pdf/website for beginners? or if u have any pdf for php pls mail me. Thanks in advance!