Shiflett=>Re: [PHP] deleting one cookie is deleting both..why? (tiny scripts)

From: Date: Thu, 17 Jul 2003 18:38:14 +0000
Subject: Shiflett=>Re: [PHP] deleting one cookie is deleting both..why? (tiny scripts)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-155663@lists.php.net to get a copy of this message
Hey, Thanks dude, will give it a go. Cheers, -Ryan ----- Original Message ----- From: "Chris Shiflett" <shiflett@php.net> To: "Ryan A" <ryan@jumac.com>; <php-general@lists.php.net> Sent: Thursday, July 17, 2003 5:34 PM Subject: Re: [PHP] deleting one cookie is deleting both..why? (tiny scripts) > --- Ryan A <ryan@jumac.com> wrote: > > I am setting 2 cookies like so:(setCookie.php) > ... > > > > setcookie("name1","1","0","",".bestwebhosters.com"); > > > > setcookie("name2","1","0","",".bestwebhosters.com"); > ... > > then I am trying to delete the second cookie like so:(delCookie.php) > ... > > > > setcookie("name2","1","-3600","",".bestwebhosters.com"); > ... > > <a > > href=http://bestwebhosters.com/testing/ReadCookieEx.php>Read</a> > > > > When I check ReadCookie it shows me that both hav been deleted....why? > > Don't delete the cookie, and you'll still find that both are "deleted". The > truth is that neither would be deleted, but they will only be sent to domains > within .bestwebhosters.com, which http://bestwebhosters.com is > not. > > Hope that helps. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ >

« previous php.general (#155663) next »