I have a php app that is to set/update a cookie.
I am using setcookie("hdclimit", $_GET['CLIMIT'], time() + (3600 * 24 * 364) + 5,"/", ".v4.dir.com");
to set the cookie.
and then if (isset($_COOKIE[hdclimit]))
{ print("cookie has been set<br>");
$default_climiter = $_COOKIE[hdclimit];
}
else { print("The cookie wasn't set");$default_climiter = "10";}
to determine whether or not the cookie has been set.
The first time I enter the web page, I receive the not set message and upon exiting I can find the cookie file in the C:\Documents and Settings\username\Cookies directory.
The second time I enter the web page, I receive the cookie found message and the cookie value is used.
When I exit from the web page, the cookie is gone from the C:\Documents and Settings\username\Cookies directory.
The 3rd time I enter the web page, I again receive the cookie not found message.
What causes this cookie to disappear on me. Is it not just supposed to update?
Bookmarks