How to fix this PHP error?

  • Thread starter Thread starter Liam S
  • Start date Start date
L

Liam S

Guest
I have a form when submitted inserts a row in to a MYSQL database, but once it is submitted the user is meant to be redirected to another page. When it comes to redirecting them via the function header() I get this error:

Warning: Cannot modify header information - headers already sent by (output started at /nfs/c04/h01/mnt/61396/domains/beta.youdooworld.com/html/assets/include/header.php:4) in /nfs/c04/h01/mnt/61396/domains/beta.youdooworld.com/html/help/discussions.php on line 48

I not sure what is wrong, and I have never had this problem until now.

Thanks,
Liam
 
i have found that white space casues this problem, make sure there is no un neccissary blank lines in your code before the header() function.


Hope this helps
 
You have something sending output before the header command goes off, it might be a number of things, including the UTF.8 BOM, you really should give us more information about the script.

Eventually check the output buffering functions, as they help holding out the output buffer until you are sure you can put it out.
 
Back
Top