Strange setcookie problem?

From: Date: Tue, 22 Apr 2003 23:23:55 +0000
Subject: Strange setcookie problem?
Groups: php.general 
Request: Send a blank email to php-general+get-144919@lists.php.net to get a copy of this message
Hi all, I use the following code to set a cookie on a page on my site: $value = 'some other value'; setcookie ("mad", $value, time()+3600); When I test for the existence of cookies on this and other pages via print_r($_COOKIE); it shows up as existing with the appropriate value -- EXCEPT on my site's index page, where I am attempting access it to determine if the visitor has opted in to particular content. Output from print_r on /index.php: Array ( [member_id] => 1 [pass_hash] => 3ea2565f212a118e5a808103fea59152 [anonlogin] => -1 [PHPSESSID] => 94be8c1b429b6d71699ef1e6bb0ffcc7 [imgnm] => Buffy.jpg ) Output from print_r on, for example, /html/blogsection.php: Array ( [mad] => some other value [imgnm] => doubledecker.jpg [member_id] => 1 [pass_hash] => 3ea2565f212a118e5a808103fea59152 [anonlogin] => -1 [PHPSESSID] => 94be8c1b429b6d71699ef1e6bb0ffcc7 ) Can anyone help me understand why this cookie appears to be available on some if not most pages, but wouldn't be available on the index page? Note: this is currently being tested on my local server, which is running on WindowsXP with Apache 1.3.24 (elsewhere in phpinfo() output it says Apache 1.3.19?) and PHP 4.3.0 and IE6. Any help immensely appreciated! Murray http://www.planetthoughtful.org Building a thoughtful planet, one snide comment at a time...

« previous php.general (#144919) next »