Forum Moderators: coopster

Message Too Old, No Replies

Header error - cookie related

         

smallcompany

4:11 am on Dec 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have PHP script being called from HTML by php include.

.httaccess in the folder where the HTML and script are, is one line only:

addtype application/x-httpd-php .php .html

and parsing works fine, but with "Headers already sent" error.

The line where PHP error is pointing to is in relation to "setcookie"

If I turn the cookie check OFF (in the script), everything works fine.

Now, why would cookie cause this?

Thanks

cameraman

6:27 am on Dec 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Cookies are sent with the header, so you have to set them before any other output from your script.