I tried that code to show all errors and I get this:
Notice: Undefined variable: username in W:\www\flite\includes\header.php on line 11
Notice: Undefined variable: password in W:\www\flite\includes\header.php on line 11
Notice: Undefined variable: dbasename in W:\www\flite\includes\header.php on line 11
However, in the included config.php, it has all of the variables in it like so...
<?php
$username = "root";
$password = "root";
$dbasename = "flite";
?>
I know it is connecting to config.php just fine but I don't get why these variables are undefined... TheDefender, thank-you but your solution didn't solve the problem... just for the record... here is the code for the page
<html>
<!-----[ This is the header for every single page... edit this and the top and / or layout of all your pages will change ]----->
<head>
<?php
error_reporting(E_ALL);
function connect($username, $password, $dbasename) {
include("config.php");
mysql_connect("localhost", "$username", "$password") or die(mysql_error());
mysql_select_db("$dbasename") or die(mysql_error());
}
connect($username, $password, $dbasename);
$array = mysql_query("SELECT * FROM flite_config WHERE id = '0'");
$name = mysql_fetch_array($array);
$sitename = $name['sitename'];
mysql_close();
?>
<title><? print($sitename); ?></title>
That's not the end but that is the affected area... I will post some phps files up here