showing cookie not working
Posted: Tue Jun 09, 2009 4:25 pm
I have managed to get the code to save the cookie to my computer using the following code:
Now I cant use the cookie, when I try to echo it or use it, it still doesn't work?? I have tried using:
This is so that I can show some text if the cookie exists, or show something else if the cookie doesn't exist.
Code: Select all
<?php setcookie("excludeAnalytics", excludeAnalytics, time()+31536000, "/", ".zippygame.com", 1); ?>Code: Select all
<?php
if(isset($_COOKIE['excludeAnalytics']))
{ echo "Showing"; }
else
{ echo "Not Showing"; } ?>