I just need to be able to do the following:
1. if they already have the cookie, don't do anything
2. if they don't have the cookie, set a cookie with expiration date 24 hours.
would something like this work
to check if surfer has a cookie named 'visitor'
Code: Select all
if (!empty($_COOKIE['visitor']))
{
}Code: Select all
{
setcookie ('visitor', '1', time() + (60*60*24));
}