Re: Check multiple cookies

From: Date: Tue, 22 May 2001 19:03:48 +0000
Subject: Re: Check multiple cookies
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-53899@lists.php.net to get a copy of this message
At 05:04 PM 5/21/01 +0100, James Holloway wrote:
Hi Sam, The following is exactly what I typed in (just copy and pasted) but I'm still getting the error: Cannot add header information - headers already sent by (output started at web.php:2) in web.php on line 19 Make sure that all output for Cookies and header information is sent before any HTML, and that there is no whitespace before the initial <? tag - that's probably the source of the problem. Have a search for Output buffering on the PHP main site.
I have created a cookie that I can read in ASP using the following: response.write Request.Cookies("cookie1") & "<p>" However PHP will not output the value from the following statement: $cookie1 = $HTTP_COOKIE_VARS["cookie1"]; and if fact returns the error: Undefined index: cookie1 Anybody have any idea why that might be?

« previous php.general (#53899) next »