Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cookies don't work in IE

Status
Not open for further replies.

fortytwo

Technical User
Apr 18, 2000
206
GB
Hi all,

I have some code here:
[tt]
$time = time();
$exp = $time + 60;
$cookie = setcookie("usercookie", "hello", $exp);
[/tt]
that is meant to set a cookie, and it does in netscape 4.8 but it IE doesn't seem to take it (it is not there when I check in the script). Anyone got any ideas?

fortytwo
will@hellacool.co.uk
 
I have tried this:
[tt]
$time = time();
$exp = $time + 60;
$cookie = setcookie("usercookie", "hello", $exp, "/", ".windupbanana.co.uk");
[/tt]
and:
[tt]
$time = time();
$exp = $time + 60;
$cookie = setcookie("usercookie", "hello", $exp, "/", ".windupbanana.co.uk", 0);
[/tt]
but still the cookie does not get set. I am really stumped over this one. I have had the shortened version working before on a different server:
[tt]
$time = time();
$exp = $time + 60;
$cookie = setcookie("usercookie", "hello", $exp);
[/tt]
Could this be due to the different server?

Will.

fortytwo
will@hellacool.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top