--- Steve Buehler <[EMAIL PROTECTED]> wrote:
> $cookhost=$_SERVER["HTTP_HOST"];
> header("Set-Cookie: aa_host=$cookhost;");
> setcookie ("aa_host", "$cookhost",0,"/","$cookhost");
> setcookie ("aa_host", "localhost",0,"/","localhost");
> setcookie ('aa_host', 'localhost',0,'/','localhost');
...
> I can set the cookie with the "header" line with no problem,
> but either one of the "setcookie" lines will not set the cookie.

Hi Steve,

You're not specifying a hostname in your header() example, but you are in each
of the setcookie() examples (and randomly switching between using $cookhost as
a value or as a hostname).

My advice is to check out http://www.php.net/setcookie and paying close
attention to:

1. The order of the parameters
2. The fact that they are not all required

Hope that helps.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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

Reply via email to