I still can't figure something out. I am using WinXP/Apache 1.3.24/PHP 4.2.3 on my laptop and my cookies still don't work like they should. Hopefully someone can explain to me why.
<?
$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. Has anybody seen this? Does anybody know why this might be happening? BTW, no, I do not try to set all of these at once. Just showing the lines that I use. The "header" line and the first two "setcookie" lines work just fine on a RedHat 7.3/Apache 1.3.27/PHP 4.2.2 machine.

Thanks
Steve


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



Reply via email to