[PHP-DEV] Bug #788: SetCookie will not work with whitespace leading the <SCRIPT language="php"> tag From: mavpion <email protected>
Date: 09/25/98

From: mavpion <email protected>
Operating system: Linux
PHP version: 3.0.4
PHP Bug Type: Performance problem
Bug description: SetCookie will not work with whitespace leading the &lt;SCRIPT language="php"&gt; tag

this script:
        <SCRIPT language="php">
SetCookie("TestCookie","foobar");
</Script>

Produces the error:
Oops, php3_SetCookie called after header has been sent

whereas this script:
<SCRIPT language="php">
SetCookie("TestCookie","foobar");
</Script>

works.

Apparently the leading whitespace causes a header to be sent, making the cookie not work. Can you change this behavior? I am in the habit of right justifying the <script> tag, but if I want to use cookies, I must left justify it.

Thanks

--Eric Guenterberg

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>