this is a standard way of conecting to your db that might be what you want:
<?
//You might not want to connect as root as this is generally a bad idea but..
@ $db = mysql_pconnect($mysqlserver, "root");
if (!$db)
{
echo "Error: Could not connect to database. Please try again later.";
exit;
}
mysql_select_db("DB Name");
//Your MySql query..
$query = "SELECT * FROM table";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
//This is done within the table which may or may not be what you want:
echo"<table align=\"center\" width=\"50%\" border=\"2\" cellpadding=\"0\" cellspacing=\"5\">";
echo "<tr>";
echo "<th>First Name</th>";
echo "<td>";
echo ($row["FirstName"]);
echo "</td>";
echo "<tr>";
Hope this is some help, You'll obviously need to change some bits...