Reputation: 11861
I have these two cookies that I am setting, they work in firefox but no where else, I have no idea why and I've been googling my ass off trying to find an answer...here are my cookies
setcookie("expire", 'Baldhead' , time() + 1800, "/");
setcookie("baldhead", 'Baldhead' , time() + 7200, "/");
Why are they not working?
Upvotes: 0
Views: 398
Reputation: 746
You can use just this
setcookie("expire",'Baldhead',time()+1800);
setcookie("baldhead",'Baldhead',time()+7200);
Hope this works for you .
Upvotes: 0
Reputation: 3309
Make sure that this is the first thing being output from your script!
It's being sent through HTTP headers.
http://php.net/manual/en/function.setcookie.php
More of your source would help out, so we could see the context in which it's being generated.
Upvotes: 1