setcookie failed using host:: 'localhost'
hello
I cannot get setcookie to work when using this code in php:
setcookie("auth", "1", 0, "/", "localhost", 0);
when I replace localhost with an empty string like this:
setcookie("auth", "1", 0, "/", "", 0);
everything works fine.
What is the cause this?
|