The problem is that your connection file has been modified and a key piece has been removed. In the connection file after the values are set you need to have this line of code:
$localhost = mysql_pconnect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR);
This is what is creating the connection to your MySQL server, the MySQL link resource is then stored in this $localhost variable. On your index page on the line you are getting the error on the code looks like this:
It is referencing this $localhost variable that was missing in the connection file. So the error is letting you know that this MySQL resource, $localhost, is not valid.