<?php
$host = 'localhost';
$user = 'root';
$pass = '';
$db = 'your_db_name';
if(!mysql_connect($host, $user, $pass) || !mysql_select_db($db))
{
die('Error');
}
$query = "Your Sql select query";
if($q_run = mysql_query($query))
{
while($row = mysql_fetch_assoc($q_run))
{
$col1 = $row['col1'];
$another_col = $row['another_col'];
$name = $row['Name'];
echo '<td>'. $col1 .' ' . $another_col . '</td>';
}
}
I see you are a PHP beginner. So I would recommend you to watch this video tutorial series.
http://www.youtube.com/watch?v=iCUV3iv9xOs&list=PL442FA2C127377F07[
^]
I find reading books about a language like PHP to be lame. These tutorials are not so boring and it's a good way to learn.