Dper,

You can't set and retrieve the cookie on the same page. Please see:

http://www.netscape.com/newsref/std/cookie_spec.html

for an explanation of the specification. You basically have to reload the
page before the cookie variable you set is avaiable. Try using sessions if
you can.

-Flint

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 4:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] The problem of cookie


Hi all,
 I set the cookie and retrieve it at the same page but when I click botton
twice, it only appear once.
No matter how many times I click, it is always one time short. How can I
solve this problem?

When I click the botton, it will get the variable from cookie then connect
to the database to retrive the data.
But the value of the variable is always empty at the last time. When I
checked the cookie, the variable got the value already. I don't know if I
can set and retrieve cookie at the same page.

Thanks a lot

Dper



-- 
PHP Windows 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 Windows 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