coockie notify?
Posted: Sun Dec 07, 2003 9:05 am
how can i notify a visitor on my site, that he must enable his browser to accept coockies?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
setcookie("tempName","aValue", strtotime("+1 hour", time()));
?>Code: Select all
<?php
if(isset($_COOKIE["tempName"]))
{
echo "Cookies are enabled.";
setcookie("tempName", "", strtotime("-1 hour", time())); // deletes the temp cookie
}
else
{
echo "Cookies are disabled. TURN THEM ON!";
}
?>