note 24552 deleted from function.setcookie by sniper

From: Date: Wed, 11 Dec 2002 06:41:33 +0000
Subject: note 24552 deleted from function.setcookie by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-40691@lists.php.net to get a copy of this message
Some info about the sub-domain cookie: Broswer NS4.7 + PHP3.1.18 when set cooike at /~user/test.php (e.g setcookie ('foo', 'me') ), /~user/dir/test1.php can read it, but seem can't overwrite it, ie, even use setcookie('foo', 'other') at /~user/dir/test1.php, NS can alert the new value set (NS set as alert when cookie set), but $HTTP_COOKIE_VARS will always had value $foo=me. If at /~user/dir/test1.php delete the cookie (setcookie('foo') ), even NS alert than cookie deleted (NS shown foo=deleted), at /~user/test.php, it can still read this value. If U want a 'global' cookie, just the 4th parameter as '/' (e.g. setcookie('foo', 'me', time()+3600, '/')) and when clear it, use setcookie('foo', '', -1, '/')

« previous php.notes (#40691) next »