Make a file with something like the following...
<?php
$host = 'host';
$user = 'user';
$pass = 'pass';
function dbConnect($database='') {
global $host, $user, $pass;
mysql_connect($host, $user, $pass)
or die('The site database appears to be down.');
//...