
Originally Posted by
felgall
You could then save the time in the cookie data itself and compare the current time to the time in the cookie to see if the 1000 seconds has passed instead of simply checking if the cookie exists.
I feel that your suggestion looks very cool.

Originally Posted by
felgall
simply remove the expiry time from the command writiing the cookie.
As your say, the code below which is removed the expiry time works fine.
Code:
setcookie("myCookie", 1)
I used the code below before I simply remove the expiry time. the red part below is for working the cookie with sub-domains.
Code:
setcookie("myCookie", 1 ,time()+100, "/", ".dot.kr");
Now I simply remove the expiry time like the code below, but it doesn't work saying Warning: setcookie() expects parameter 3 to be long, string given in \cookie11-2.php on line 2
Code:
setcookie("myCookie", 1 , "/", ".dot.kr");
How can I remove the warning and make it to work?
Bookmarks