<?php $host = "localhost"; $user = "root"; $pass = ""; $database = "my_db"; $connection = mysql_connect($host,$user,$pass) or die (mysql_error()); mysql_select_db($database) or die (mysql_error()); ?>
info at phpclasses dot org