$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$dbname = 'databasename';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$connection = mysql_select_db($dbname) or die ('Error connecting to mysql database');