쿠키 생성 및 사용
<?php
session_start();
if (isset($_SESSION['views'])) {
$_SESSION['views']=$_SESSION['views']+1;
} else {
$_SESSION['views']=1;
}
echo "Views=" . $_SESSION['views'];
?>
쿠키 삭제
<?php
unset($_SESSION['views']);
?>
또는
<?php
session_destroy();
?>
Reference:
http://www.w3schools.com/php/php_sessions.asp