Posted by windandwaves on 09/28/33 11:37
Fernando Rodrνguez wrote:
> Hi,
>
> How do I test if a user has a given cookie? O:-)
>
> Thanks
Here is how I do it:
//set the cookie:
setcookie("CookieTest", "t");
//test of the cookie exists (can only be done in the next page / load)
if($_COOKIE["CookieTest"] == "t") {
echo "cookie exists";
}
HTH
- Nicolaas
Navigation:
[Reply to this message]
|