Help! I built a form and a page to process it. It worked yesterday, but I needed to add some extra stuff and now I'm missing something. I get this error message: "Warning: Cannot modify header information - headers already sent by (output started at /home/artwo6/public_html/secretartists/process.php:2) in /home/artwo6/public_html/secretartists/process.php on line 11" Here is my code: (sorry, not sure how to add it like everyone else does)
Hmmm, I don't see anything very obvious. Normally I get that if I print/echo something BEFORE the header() line, but that doesn't appear to be the case unless even I am over looking something.
Are you by any chance, including the page in another, which has a print/echo? Also, is it possible that you're getting a SQL error before your header error? If you are, then that's your "print/echo".
I think you have to make sure that the following line below are correct. If it's not correct it will output an error to the browser and it cause the header to display that error. Make sure you connect to database and also make sure your database name is correct. $db=mysql_connect("localhost", "LOGIN", "PASSWORD") or die("Could not connect to localhost."); mysql_select_db("artwo6_secretartists08", $db) or die("Could not find visitors.");
I can't see any obviously errors either except the above ones, it won't be DB errors as that would stop execution, try either using the output buffering functions or headers_sent($a, $b);