Hi All,
I am currently displaying the contents of a database directly onto a webpage, is there a way i can dispaly it a bit neater, like use a few tables to align the data, what is the best method to do this, currently im just this code:
<?php
mysql_connect("localhost", "root","2233home") or die(mysql_error());
mysql_select_db("customers") or die(mysql_error());
$query="SELECT * FROM CustList";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$CustID=mysql_result($result,$i,"CustID");
$CustNo=mysql_result($result,$i,"CustNo");
$Name=mysql_result($result,$i,"Name");
$Address=mysql_result($result,$i,"Address");
$Day=mysql_result($result,$i,"Day");
echo "$CustID $CustNo $Name $Address $Day<BR>";
$i++;
}
?>
This displays the contents on a webpage but it just looks untidy, is there a way of creating a "html" type table and putting the data into this tabe?
Thanks