php user set cookie example code
Example 1: cookie are not set in php
setcookie('username',$username,time()+60*60*24*365);
// 'Force' the cookie to exists
$_COOKIE['username'] = $username;
Example 2: php page sends cookie to visitor
<?php $Month = 2592000 + time();//this adds 30 days to the current timesetcookie(UserVisit, date("F jS - g:i a"), $M