go to www.codewalkers.com under the tutorials/basics section there is a tutorial called "Sorting Database Results with PHP". It will show you how to display the data. If you are just looking for a quick cheat - You need to use tables. Place each record on a table row <TR> and each attribute in a table data <TD>.
Respectfully, Ligaya Turmelle "Seena Blace" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > Does any one help me in formating the output result in PHP with mysql? > The code is here. > <form action="hostrep.php" method="get"> > </form> > <? > $username="root"; > $password=""; > $database="databasename"; > $host="localhost"; > $today = date("F j, Y, g:i a"); > mysql_connect($host,$username,$password); > @mysql_select_db($database) or die( "Unable to select database"); > #echo "Connected successfully"; > #$softwareid=$_GET['softwareid']; > #$softwareid1=$_GET['softwareid1']; > $query="SELECT hostid,hostname,cabinetnumber FROM host"; > $result=mysql_query($query); > $num=mysql_numrows($result); > mysql_close(); > echo "<b><center>Host Details $today</center></b><br><br>"; > $i=0; > while ($i < $num) { > $hostid=mysql_result($result,$i,"hostid"); > $hostname=mysql_result($result,$i,"hostname"); > $cabinetnumber=mysql_result($result,$i,"cabinetnumber"); > echo "<b>$hostid $hostname $cabinetnumber <br><br>"; > //echo "<b>$softwareid $manufacturer</b><br>name: $name<br>Version: $version<br><hr><br>"; > Thanks > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Search - Find what you're looking for faster. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]