<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>
<body>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFCC" bgcolor="#99CCFF">
<tr>
<td colspan="3"><div align="center"><strong>แสดงข้อมูลรายการสินค้า( รถยนต์
)</strong></div></td>
</tr>
<tr>
<td width="18%"><div align="center"><strong>MENU</strong></div></td>
<td width="61%" bgcolor="#FFFFFF"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#333333">
<tr bgcolor="#333333">
<td width="15%"><div align="center"><font color="#CCCCCC" size="2"><strong>ลำดับ</strong></font></div></td>
<td width="15%"><div align="center"><font color="#CCCCCC" size="2"><strong>รหัส</strong></font></div></td>
<td width="9%"><div align="center"><font color="#CCCCCC" size="2"><strong>ยี่ห้อ</strong></font></div></td>
<td width="10%"><div align="center"><font color="#CCCCCC" size="2"><strong>รุ่น</strong></font></div></td>
<td width="11%"><div align="center"><font color="#CCCCCC" size="2"><strong>สี</strong></font></div></td>
<td width="21%"><div align="center"><font color="#CCCCCC" size="2"><strong>ราคา</strong></font></div></td>
<td width="13%"><div align="center"><font color="#CCCCCC" size="2"><strong>จำนวน</strong></font></div></td>
<td width="21%"><div align="center"><font color="#CCCCCC" size="2"><strong>รูปตัวอย่าง</strong></font></div></td>
</tr>
<?php
$host ="localhost";
$un="root";
$pwd="";
$Myconn = mysql_connect($host,$un,$pwd);
if ($Myconn) {
$StrSQL = "Select * From Product";
$Result =mysql_db_query("CarDB",$StrSQL,$Myconn);
$iRow = mysql_num_rows($Result);
for($i=0;$i<$iRow;$i++) {
?>
<tr bgcolor="#eeeeee">
<td><div align="center"><font size="2"><?php echo $i+1; ?></font></div></td>
<td><div align="center"><font size="2"><?php echo mysql_result($Result,$i,"pid"); ?>
</font></div></td>
<td><div align="center"><font size="2"><?php echo mysql_result($Result,$i,"BrandName"); ?>
</font></div></td>
<td><div align="center"><font size="2"><?php echo mysql_result($Result,$i,"Version"); ?>
</font></div></td>
<td><div align="center"><font size="2"><?php echo mysql_result($Result,$i,"Color"); ?>
</font></div></td>
<td><div align="center"><font size="2"><?php echo mysql_result($Result,$i,"Price"); ?>
</font></div></td>
<td><div align="center"><font size="2"><?php echo mysql_result($Result,$i,"QTY"); ?>
</font></div></td>
<?php echo "<img src='" . mysql_result($Result,$i,"CarPicture") . "' width='124' height='92'>"; ?>
</font></div></td>
</tr>
<?php
} // end for loop
} else {
echo " <tr><td colspan='7'> ";
echo "ไม่สามารถติดต่อ ฐานข้อมูลได้";
echo "</td></tr>";
}
?>
</table></td>
<td width="21%"><div align="center"><strong>BANNER</strong></div></td>
</tr>
</table>
</body>
</html>
|