Hi,
I am having some problems with cookies and checking that a browser has them enabled.
What I am doing is the following:
setcookie("check_cookie", "on", time()+3600);
if (!$_COOKIE['check_cookie']) {
echo "<meta http-equiv=\"refresh\" content=\"0;url=201_en.php\">";
}
In my mind this should set a cookie, and then check if the cookie was set. If it was, the script continues. If not they're bumped to the refresh page.
So.. here's the problem I'm having. I have a temp page with a link to the page that contains this code. I load it and then delete all cookies in the browser. I make sure cookies are enabled in my browswer. Then I click the link and it bumps me to the refresh page.
Should it not set the cookie properly and check that it was in fact set?? Why am I being bumped to the refresh page?
It seems to work fine if I just open a browswer and go directly to that script which contains the cookie code.