On most of my PHP pages I have a simple include statement which says include("databaseinfo.php");
The file, databaseinfo.php is a short and simply bit of code that simply declares the variables for getting into my mySQL database.
The entire file reads as follows...
<?
$host="hostname";
$user="myname";
$password="mypassword";
$database="thedatabase";
?>
Now, I've been successfully including that file on just about every page when I've been testing it on my home computer. I have had no problems at all, whenever I've tested the site on my homecomputer (which has Apache installed at the localhost).
HOWEVER, when I use those same scripts on the "real", online website, then it won't let me do header redirects after the include statement. I keep getting the error message...
"Warning: Cannot modify header information - headers already sent by (output started at bla bla bla on line 15"
So, in other words, it's counting the include statements as screen output- which it clearly is NOT.
Can anyone PLEASE offer any advice with this one? It's killing me.