I get this error: My config file: <? //Database connection info $hostname = "localhost"; $username = "username"; $password = "password"; $dbName = "dbname"; MYSQL_CONNECT($hostname, $username, $password) OR DIE("Unable to connect to database"); @mysql_select_db( "$dbName") or die( "Unable to select database"); ?> PHP: Server runs PHP version 4.3.11 and MySQL 5.0
Wrong username and/or password? You could try and replace "localhost" with "127.0.0.1", i've had issues with that a couple of times.
which one of the two functions is causing the error? they both output the same. Maybe you just entered a wrong database name. BTW: you don't have to wrap the $dbName in quotes, it's allready a string.