Re: Cookie

From: Date: Sat, 23 Dec 2000 19:39:41 +0000
Subject: Re: Cookie
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-31706@lists.php.net to get a copy of this message
You aren't specifying the directory on the website you are setting the cookie for, so it only will be sent for the directory (in relation to the webserver) that it was sent from or below. If you set the path to just "/", it will work from lower directories too, which are directing to a lower directory. Matthew At 04:14 PM 12/22/2000 -0800, you wrote:
I've used cookie in PHP before with problem but I now have a problem. I do:
        setcookie("cbcookie[1]",$domain, time()+3600);
        header("Location:../home.php");
In home.php, I do to read the cookie var:
      $domain = $HTTP_COOKIE_VARS["cbcookie[1]"];
      echo "domain($domain)<br>";
And I see blank. I see the cookie created in IE's Cookies dir in my HDD. Please help me. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#31706) next »