Brandon,

There are a few things about cookies that are not completely. I may be 
wrong about this, but this is what I've found:

• When a cookie is set, it must be passed before any other headers or 
tags. But the cookie is not actually available to the page it was set 
on. If the user reloads the page, or goes to another link, the cookie 
can then be read.

• When you put setcookie() in a PHP file, the cookie will be created 
every time the page is loaded. This will overwrite any previous cookie 
info stored. To overcome this, you can use conditional statements that 
test for the cookie. Just be sure that any code before setcookie does 
not create output (ie echo).

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Wednesday, February 20, 2002, at 10:04  AM, Brandon Orther wrote:

> Hello,
>
> I know how to set a cookie.  How do I read the value of that cookie the
> next time that person returns to my website?
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to