Re: Fw: [PHP] Re: headers and cookies
| From: | rolf vreijdenberger | Date: | Thu, 31 Oct 2002 00:37:05 +0000 |
| Subject: | Re: Fw: [PHP] Re: headers and cookies | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-122156@lists.php.net to get a copy of this message | ||
what I found out in the meantime is that you CAN use cookies and headers,
just like you said, but my particular problem arose because a notice was
issued for an undefined variable;
I didn't check correctly for it's existence.
so any output, and also output like notices, warnings and errors, just
anything you might get in a development situation, outputs headers and the
consecutive calls to header() or setcookie() will fail.
for clarity, this was the output:
notice; undefined index: bla in file.php on line 162 #wrong check in if
condition
warning: cannot add header infromation - headers already sent by (output
started at file.php) in file.php on line 164#wetcookie call, but notice has
already been sent out, so this will fail