Reputation: 51
After I set this cookie it doesn't work. When I leave the domain part away and test it on the localhost, I can echo the cookie though:
setcookie("email",$email,0, "/", ".domainname.com");
Upvotes: 2
Views: 334
Reputation: 490507
If you want to test on localhost
, than make the domain localhost
.
You wouldn't expect setting it to google.com
to allow you to set cookies for google.com
would you?
Upvotes: 1