How can i display one record from my database table 'order' this is what i have so far:
i would like to display an record from my table that has an order id of 1PHP Code:<html>
<head>
<title>view order</title>
</head>
<html>
<body><body bgcolor="#6699FF">
<p><font face="Berlin Sans FB" size="5" color="#000080">View order</font></p>
<p><font color="#000080" size="4" face="Berlin Sans FB">This is your order to confirm and place the order click on the confirmation button
at the bottom of the page</font></p>
</body>
</html>
<html>
<body><font face="Berlin Sans FB" size="3" color="#000080"><b>
<table>
<table width="72%" border="2" p align="center" height="45">
<tr><p align="center">
<td width="92"><p align="center"><font face="Berlin Sans FB" color="#000080"><B>order id</B></font></td>
<td width="111"><p align="center"><B><font face="Berlin Sans FB" color="#000080">Customer id</font></B></td>
<td width="220"><p align="center"><font face="Berlin Sans FB" color="#000080"><I><B>Date</B></I></font></td>
<td width="260"><p align="center"><b><font face="Berlin Sans FB" color="#000080">time</font></b></td>
<td width="300"><p align="center"><b><font face="Berlin Sans FB" color="#000080">menuid</font></b></td>
<td width="340"><p align="center"><b><font face="Berlin Sans FB" color="#000080">qty</font></b></td>
<td width="380"><p align="center"><b><font face="Berlin Sans FB" color="#000080">total bill</font></b></td>
</tr>
<?
$username="root";
$password="mehul";
$database="delivery";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM orderdetails";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$orderid=mysql_result($result,$i,"orderid");
$customerid=mysql_result($result,$i,"customer id");
$date=mysql_result($result,$i,"date");
$time=mysql_result($result,$i,"time");
$menuid=mysql_result($result,$i,"menuid");
$qty=mysql_result($result,$i,"qty");
$totalbill=mysql_result($result,$i,"totalbill");
?>
<body bgcolor="#6699FF">
<table>
<table width="72%" border="2" p align="center" height="45">
<tr><p align="center">
<td width="92"><p align="center"><font face="Berlin Sans FB" color="#000080"><B><? echo $orderid; ?></B></font></td>
<td width="111"><p align="center"><font face="Berlin Sans FB" color="#000080"><B><? echo $customerid; ?></font></B></td>
<td width="220"><p align="center"><font face="Berlin Sans FB" color="#000080"><I><B><? echo $date; ?></B></I></font></td>
<td width="260"><p align="center"><font face="Berlin Sans FB" color="#000080"><? echo $time; ?></font></td>
<td width="300"><p align="center"><font face="Berlin Sans FB" color="#000080"><? echo $menuid; ?></font></td>
<td width="340"><p align="center"><font face="Berlin Sans FB" color="#000080"><? echo $qty; ?></font></td>
<td width="380"><p align="center"><font face="Berlin Sans FB" color="#000080"><? echo $totalbill; ?></font></td>
</tr>
</table>
<?
$i++;
}
echo "</table>";
</font> <a href="confirmation.html"><img border="0" src="vieworder.gif" width="95" height="20">
in a tabular format
please some1 help





Bookmarks