note 110428 deleted from function.setcookie by googleguy
| From: | googleguy@php.net | Date: | Sat, 20 Oct 2012 22:30:42 +0000 |
| Subject: | note 110428 deleted from function.setcookie by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191453@lists.php.net to get a copy of this message | ||
Note Submitter: SANNER
----
My cookie would work on Firefox but not on IE9 or Safari, until I added "/" to it.
Ex.
$user = "Partner";
$value = $_POST[partner]; //PARTNER ID
$expire = time() + 60*60*24*30*12; //EXPIRES AFTER 1 YEAR
$doman = "mywebpage.com";
setcookie($user, $value, $expire, $doman); <- Would not work
BUT
When I tried
setcookie($user, $value, $expire, "/", $doman);
It worked on IE9 and Safari. Hope it helps, I wasted hours on this problem.