FW: Setting cookies question

From: Date: Sat, 08 Feb 2003 08:43:05 +0000
Subject: FW: Setting cookies question
Groups: php.windows 
Request: Send a blank email to php-windows+get-18403@lists.php.net to get a copy of this message
Warning...admitted Newbie I can't seem to get cookies set on my win2k php installation (latest version of php, just loaded this week): I run this script on a page: <? // Check to see if chocolate chip cookie actually exists. if (isset($_COOKIE["ChocolateChip"])) { // Grab the value from cookie. $value = $_COOKIE["ChocolateChip"]; // Print the cookie value. print "$value"; // If chocolate chip cookie doesn't exist ... } else { // Set cookie with a value. setcookie ("ChocolateChip","Yummmmmy!"); // Redirect back to this page. header("Location: cookies.php"); } ?> and the page never loads....it eventually just times out, meaning it is just looping on itself, I suppose. I don't get any messages in my event log (error_reporting = E_ALL). Is something supposed to be written to the php/sessiondata directory? On my local machine, I search my cookie directory for the cookie, but I don't find any cookies that match (using IE 6.0+) What am I doing wrong? Any help is appreciated. Thanks, Andrew

« previous php.windows (#18403) next »