RE: AW: [PHP] Kill a cookie....

From: Date: Thu, 17 May 2001 10:21:01 +0000
Subject: RE: AW: [PHP] Kill a cookie....
Groups: php.general 
Request: Send a blank email to php-general+get-53204@lists.php.net to get a copy of this message
Cookie is a file sent by a browser to the server. If you set a cookie, you will be still unable to read it on your page, unless you give the browser a chance to resend it to you. To do so you'll need the user to hit or refresh a page on your site. Then, and only then the browser will be sending the new cookie file. Here's a little solution: since you are setting the cookie to something (whether it is a null or value), set the variable so first, then read the variable. So it will become available till the page ends. Then on a new hit a new value will arrive. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) maxim@phpbeginner.com www.phpbeginner.com -----Original Message----- From: Tristan.Pretty@risk.sungard.com [mailto:Tristan.Pretty@risk.sungard.com] Sent: Thursday, May 17, 2001 6:56 PM To: php-general@lists.php.net Subject: Re: AW: [PHP] Kill a cookie.... Thanks to all who replied. I am really confused as to why, at teh very top of my page, I have told the cookie to set to null. and then in the last part of my php, just before my head tag, I re-set teh cookie. but the old value still remains. What am I doing wrong??? Thanks you guys, I'll get there in the end. Tris... ;) ==================== you kill a cookie by setting an emty one with the same name.... www.php.net/setcookie sebastian ================= > > I am using setCookie("cookie1", "$form_variable") > > Is there a command like killCookie? > > I am finding that my pages are remembering cookies after they > are needed. > > I've looked on php.net, but couldn't find anything. > Tris... ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. ********************************************************************** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#53204) next »