I have 2 files, index.php and content.php ...
I am setting a cookie on the content.php
but when i am trying to retrieve that cookie in index.php
, it says undefined index
...
I dnt know the reason of this error
!
I am using this code for setting the cookie-
$loader = $_GET['id'];
$expire=time()+60*60*24*365;
setcookie("loader", $loader, $expire);
and this for retriving-
if (isset($_COOKIE["loader"])) echo $_COOKIE["loader"];
else echo "no cookie found !";
Please Help Me Guys !