note 3067 deleted from function.setcookie by john
| From: | john@php.net | Date: | Sat, 30 Nov 2002 16:09:45 +0000 |
| Subject: | note 3067 deleted from function.setcookie by john | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40147@lists.php.net to get a copy of this message | ||
Just thought I'ld share a recent problem I encountered with IE 5.01 and the SetCookie function
in PHP3.
I began writing the script while testing with IE 5.0 and the following line would set the cookie
correctly:
SetCookie ("AqmartShoppingCart","$session",time()+7200);
However when I upgraded to 5.01 it would no longer set the cookie. It appears as though IE 5.01
requires all fields the be filling in expect for the last one (secure) as in the following line of
code:
SetCookie("AqmartShoppingCart","$session",$expiretime,"/","www.aqmart.com");
So even though the documentation states certain fields can be left blank it would appear as though
it's best to use them all (aside from secure) to be assured of proper use.