Answer the question
In order to leave comments, you need to log in
Why is the cookie disappearing?
The cookie is placed in the site.ru/ref/N
directory where N is $refnum
Everything is fine, the cookie is set and overwritten if a new $refnum value is given in GET setcookie("ref", $refnum, time()+7776000);
Let's set the path parameter. Cookie is not set. setcookie("ref", $refnum, time()+7776000, '/');
Let's change the path. The cookie is set, overwritten, but again only on this page! Others have the old one. setcookie("ref", $refnum, time()+7776000, '../');
When setting the domain, it is again not set at all
setcookie("ref", $refnum, time()+7776000, '../', 'site.ru');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question