Hello everyone,
I'm having trouble with writing a cookie in IE.
I'm using the code shown below and it's working fine in Firefox but not in IE.
This code is the first thing on the page, placed before the document type and the opening HTML tag
PHP Code:
<?php
if ($_REQUEST['send']=="yes")
{
setcookie("return_user", $value);
setcookie("return_user", $value, time()+60*60*24*360); /* expire in 1 year */
setcookie("return_user", $value, time()+60*60*24*360, "/", ".example.com", 0);
}
?>
In case it's not obvious, the idea is that when the user returns to the page after having successfully filled out a form they arrive at form.php?send=yes and a cookie gets written.
Anyone know how I can get this working in IE and Firefox?
Bookmarks