Re: Re: cookies

From: Date: Wed, 10 Jul 2002 15:22:15 +0000
Subject: Re: Re: cookies
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-106835@lists.php.net to get a copy of this message
No, I just tested it myself - if you set a cookie with no expire date it exists until the browser window is closed. My code: <?php if (!isset($_COOKIE['TestCookie'])) { setcookie ("TestCookie", "FUD"); echo "Just Set a cookie - reload the page"; } else { echo "Cookie is : {$_COOKIE['TestCookie']}<br>Close the window then return and the cookie should be gone"; } ?> HTH Danny. ----- Original Message ----- From: "vins" <vins@webonline.co.za> To: <php-general@lists.php.net> Sent: Wednesday, July 10, 2002 3:34 PM Subject: [PHP] Re: cookies > Nope thats not they way.... > If you don't specify a expire date it will live for ever or until you delete > it. > > The only way is to set it with an expiry date and then it will delete > it'self when the browser closes. > Check this by running a file on the same domain with phpinfo(); > > > "Alexander Ross" <alexross@bleen.net> wrote in message > news:20020710134339.68660.qmail@pb1.pair.com... > > How can I set a cookie which expires when the borwser is closed?? How can > I > > delete a cookie via PHP? > > > > Thanks > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#106835) next »