Some things to keep in mind:

1. The cookie can't be read untill the next time you access a page.

2. The cookie can only be red in the same level as it is set (I guess), that
means that if you set a cookie in "/my/pages/index.php" you can't read the
cookie from a page in "/my/index.php".

3. To really see if the cookie is set you can use Netscape and let it warn
you before accepting a cookie, in that way you will see the cookiename and
it's value and then you can be sure the cookie is set.

4. You can do the same thing with IE.

/Magnus Hammar - The cookiemonster? =)
--------------------------------------
> Still no luck.  Do I have to read a cookie before any HTML is sent as well?
> I know to set it before it is sent but reading?
> 
> Jeff
> ----- Original Message -----
> From: "Magnus Hammar" <[EMAIL PROTECTED]>
> To: "Jeff Lewis" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, July 11, 2001 9:30 AM
> Subject: Re: [PHP] Cookie Not Setting..
> 
> 
>> Try this:
>> 
>> $cookie_name    = "wwblCookie";
>> $value          = "PLEASE";
>> $exp            = time() + (86400 * 365);
>> $server         = "www.domain.com"; // Or IP-address will also do fine
>>                                     // the domain must cuntain three "."
>>                                     // as in ".somedomain.com"
>> $secure         = 0;
>> setcookie($cookie_name, $value, $exp, "/", $server,$secure);


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