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)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 6:56 PM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to