Sunday, 27 November 2011

Setting and retrieving a cookie

<?
$check 
"test";$check .= $filename;
if (
$test == $check)
{
print(
"<HTML><BODY>You have already voted. Thank you.</BODY></HTML>");
}
else
{
$rated "test";$rated .= $filename;setcookie(test$ratedtime()+86400);
print(
"<HTML><BODY><br>You haven't voted before so I recorded your vote</BODY></HTML>");
}
?>

No comments:

Post a Comment