Jay
Jay

Reputation: 51

setcookie doesnt work

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

Answers (1)

alex
alex

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

Related Questions