set cookie
Hi Guys,
Please I wondered if anyone could tell me why this code is not working for me.
I was supposed to see "I am the cookie" when the page is
reloaded. But I got no reply.
Please can anyone assist the poor guy???
Thanks a lot.
Jam
PHP:
<?php
setcookie("my_cookie","I am the cookie!",time()+3600,"/");
if ( ! $_COOKIE['my_cookie'] )
{
echo "Reload this page to see cookie..";
}
else
{
echo $_COOKIE['my_cookie'];
}
?>
___________________
:hmm
