coockie notify?
Moderator: General Moderators
coockie notify?
how can i notify a visitor on my site, that he must enable his browser to accept coockies?
You will need to set a temp cookie and see if it exists on the next page load/refresh.
On the first page you might have..
On the second page you might have..
On the first page you might have..
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!";
}
?>