My PHP files that include the following database.php file generate the can’t send headers. Output already started error. I have recreated the file and have removed any white space. Does anybody know what would cause the error in the following code:
<?php
$dbHost = "www.a2zloads.com";
$dbuser = "site4_webusers";
$dbpass = "password";
$dbname = "site4_websiteloads";
$conn = mysqli_connect($dbHost, $dbuser, $dbpass, $dbname);
if (!$conn)
{
echo "NOT connected to: " . $dbname . "<br>";
die("Database connection failed!");
}
?>
The connection does appear to work as I am getting entries in my database.