[snip] $cfg['hostname'] = "www.server.com"; // Server domain or ip address $cfg['username'] = "username"; // Database user name $cfg['password'] = "password"; // Database password $cfg['bugemail'] = "[EMAIL PROTECTED]";
The do something like this: function database_connection() { @mysql_connect($cfg[hostname],$cfg[username],$cfg[password]); @mysql_select_database($cfg[database]); } [/snip] Why are you not using the single quoted array names? i.e. @mysql_connect($cfg['hostname'],$cfg['username'],$cfg['password']); Have you echo'd each out afterwords to see if they are right? Use mysql_error() to return connection errors so that you know what they are. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php