Display MySql query results in table

I have a query results page 1.php which returns records line by line. How can I make it display in a table? Below is the code for 1.php. Scripts for the search page Radius.html also enclosed.

Appreciate any help.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.style1 {color: #0033FF}
.style14 {font-family: "book Antiqua"; font-size: 24pt;}
.style15 {font-family: "segoe Print"; font-size: small;}
.style2 {      color: #00FF00;
      font-family: "script MT Bold";
      font-size: larger;
.style5 {font-family: "book Antiqua"}
.style22 {      color: #00FF00;
      font-family: "script MT Bold";
      font-size: 36px;
.style20 {font-family: "book Antiqua";
      font-size: 36pt;
      color: #0033FF;
.style21 {font-size: 24pt}
.style3 {      font-family: "book Antiqua", "script MT Bold";
      font-size: 24pt;
      color: #0033FF;



   DEMO for using the zipcode PHP class. By: Micah Carrick
   Questions?  Comments?  Suggestions?  email@micahcarrick.com

require_once('zipcode.php');      // zip code class

// Open up a connection to the database.  The sql required to create the MySQL
// tables and populate them with the data is in the /sql subfolder.  You can
// upload those sql files using phpMyAdmin or a MySQL prompt.  You will have to
// modify the below information to your database information.  
mysql_connect('localhost','user','pwd') or die(mysql_error());
mysql_select_db('mydb') or die(mysql_error());

// Below is an example of how to calculate the distance between two zip codes.

$Radius = $_REQUEST['Radius'];
$Destination = $_REQUEST['Destination'];

$z = new zipcode_class;

$zips = $z->get_zips_in_range($Destination, $Radius, _ZIPS_SORT_BY_DISTANCE_ASC, true);
$zipcodes = array_keys($zips); // this fetches all the zip codes in the $zips variable
$zip1 = implode(",",$zipcodes);  

//echo $zip1;  
mysql_connect('localhost','user','pwd') or die(mysql_error());
mysql_select_db('db') or die(mysql_error());
        //$sql = "select * from DEALER where ZIP = '$key'";  
        $sql = "select * from Suppliers2, Boxes where Suppliers2.Zip in (".$zip1.") AND MATCH (Boxes.Description) AGAINST ('$searchterm') AND Boxes.SID = Suppliers2.SID";  
        $result = mysql_query($sql) or die (mysql_error());  
          $num_rows = mysql_num_rows($result);  
echo "<p><b>Number of suppliers found within the specified radius of your destination: </b>".$num_rows."</p>";
          if($num_rows == 0) {  
               echo "Sorry. No records found. Please expand your radius or refine your creteria. If problem persists, please contact us.";  
          else {  

        while($myrow = mysql_fetch_array($result))  
                  $suppliername = $myrow['Supplier_Name'];
            $supplierproductcode = $myrow['Supplier_Product_Code'];
                  $description = $myrow['Description'];
                  $city = $myrow['City'];  
            $state = $myrow['State'];  
            $address = $myrow['Address'];  
                  $tollfree = $myrow['Tollfree'];
                  $phone = $myrow['Phone'];
                  $fax = $myrow['Fax'];
                  $email = $myrow['Email'];
                  $website = $myrow['Website'];
            $zipcode = $myrow['Zip'];  

            $miles = $zips[$zipcode]; // return the value for key with the zip code in it.
                  echo "<b>Supplier_Name: </b>", $suppliername;
            echo "<br>";
                  echo "<b>Supplier_Product_Code: </b>", $supplierproductcode;    
            echo "<br>";
                  echo "<b>Description: </b>", $description;
            echo "<br>";
            echo "<b>Tollfree: </b>", $tollfree;  
            echo "<br>";  
            echo "<b>Phone: </b>", $phone;  
            echo "<br>";  
            echo "<b>Fax: </b>", $fax;  
            echo "<br>";  
            echo "<b>E-mail: </b>", $email;
                  echo "<br>";
            echo "<b>Website: </b>", $website;  
            echo "<br>";  
            echo "<b>Address: </b>", $address;  
            echo "<br>";                     
            echo "<b>Distance: </b>$miles miles from your destination zip code $Destination";  // changed $value to $miles
            echo "<br><br>";  


This is the search page Radius.html
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>


  <div id="mainContent">
    <form id="form2" name="form2" method="post" action="1.php">
      <p>Please enter some key words of the products you look for (at least 4 characters)</p>
      <p><br />
        <input name="searchterm" type="&quot;text&quot;" size="60"/>
          <select name="Radius" id="Radius">
            <option value="50">50</option>
            <option value="100" selected="selected">100</option>
            <option value="150">150</option>
            <option value="200">200</option>
            <option value="250">250</option>
            <option value="300">300</option>
            <option value="500">500</option>  
            <option value="700">700</option>                      
        miles from
  <label>Destination Zip
  <input name="Destination" type="text" id="Destination" maxlength="7" />
      <p> <br />
          <input type="submit" name="submit" value="Search"/>
          <input type="reset" name="Reset button" id="Reset button" value="Reset" />
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aamir SaeedCommented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DomerBillAuthor Commented:
please delete this question and solutions from the knowledge base. i just realized the codes i provided contain some private information that i shall never show to the public. please remove them all immediately.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.