I'm running a website that pulls most of its data from a MySQL database. To connect to that database, I have to use the standard PHP connect method that looks something like this:

function db_connect()
{
$result = @mysql_pconnect("localhost", "username", "auth");
if (!$result)
return false;
if (!@mysql_select_db("my_table"))
return false;

return $result;
}

This function must be in a file that is readable by the http server so that it is executable by the website. This function also displays the username and password in plain text for all to see. Does anyone know of a better way I can protect that username and password? I can't imagine that big sites that use a database (like eBay or Amazon) have to use this method!