|
|
|
ช่วยทีครับผม พอดีออกแบบไม่ถูกว่าต้องทำยังไง จะให้มันแสดงข้อมูลจากฐานข้อมูลเหมือนสินค้าต่างๆนะครับ มีภาพนะครับผม |
|
|
|
|
|
|
|
ผมเรียกข้อมูล โชว์ได้แล้วนะครับ เหลือแต่ว่าจะทำยังไงให้มันโชว์ แบบ แถวละ 4 อันๆ
Code (PHP)
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="menu_files/style.css" type="text/css" />
<title> </title>
<style type="text/css">
.f1 {
font-size: 12px;
}
body,td,th {
font-family: Tahoma, Geneva, sans-serif;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style3 {
color: #FFFFFF;
font-weight: bold;
}
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body class="f1">
<p style="display:none"><a href="http://css3menu.com/">CSS And Menu Css3Menu.com</a></p>
<div align="center">
<table width="604" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td colspan="13"> <div align="center">
<p><strong>ยินดีต้อนรับสู่เว็บไซต์ www.Car2Home.Com</strong><br />
<strong>เว็บไซต์ขายรถยนต์มือสอง รถยนต์ รถเก่า ซื้อขายรถ ราคากลางรถมือสอง
<?
$objConnect = mysql_connect("localhost","root","1234") or die("Error Connect to Database");
$objDB = mysql_select_db("membersystem");
$strSQL = "SELECT * FROM upload";
mysql_query("SET character_set_results=utf8");
mysql_query("SET character_set_client=utf8");
mysql_query("SET character_set_connection=utf8");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
<?
while($objResult = mysql_fetch_array($objQuery))
{
?>
<br />
</strong></p>
</div></td>
</tr>
<tr>
<td width="4" height="16" valign="top"> </td>
<td width="6" valign="bottom"><img src="images/temp_32.jpg" width="6" height="5" /></td>
<td width="138" valign="bottom"><img src="images/temp_33.jpg" alt="" width="138" height="5" /></td>
<td width="6" valign="bottom"><img src="images/temp_34.jpg" width="6" height="5" /></td>
<td width="6" valign="bottom"><img src="images/temp_32.jpg" width="6" height="5" /></td>
<td width="138" valign="bottom"><img src="images/temp_33.jpg" alt="" width="138" height="5" /></td>
<td width="6" valign="bottom"><img src="images/temp_34.jpg" width="6" height="5" /></td>
<td width="6" valign="bottom"><img src="images/temp_32.jpg" alt="" width="6" height="5" /></td>
<td width="138" valign="bottom"><img src="images/temp_33.jpg" alt="" width="138" height="5" /></td>
<td width="6" valign="bottom"><img src="images/temp_34.jpg" alt="" width="6" height="5" /></td>
<td width="6" valign="bottom"><img src="images/temp_32.jpg" alt="" width="6" height="5" /></td>
<td width="138" valign="bottom"><img src="images/temp_33.jpg" alt="" width="138" height="5" /></td>
<td width="6" valign="bottom"><img src="images/temp_34.jpg" alt="" width="6" height="5" /></td>
</tr>
<tr>
<td height="16" valign="top"> </td>
<td valign="top"><img src="images/temp_39.jpg" alt="" width="6" height="185" /></td>
<td valign="top" bgcolor="#E6E6E6"><table width="135" height="175" border="0" align="center">
<tr>
<td height="106" colspan="3" align="center" valign="top" bgcolor="#E6E6E6"><a href="upload/myfile/<?=$objResult["FilesName"];?>" target="_blank"><img src="upload/myfile/<?=$objResult["FilesName"];?>" width="131" height="109" align="top" /></a></td>
</tr>
<tr>
<td width="42" rowspan="2" bgcolor="#FF0000"><div align="center" class="style3">
<?=$objResult["FilesID"];?>
</div></td>
<td width="41" bgcolor="#E6E6E6"><?=$objResult["type_car"];?></td>
<td width="41" bgcolor="#E6E6E6"><?=$objResult["know_car"];?></td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6E6E6"><?=$objResult["brand_car"];?></td>
</tr>
<tr>
<td colspan="3" bgcolor="#E6E6E6"> ขาย
<?=$objResult["price_car"];?>
บาท </td>
</tr>
</table></td>
<td valign="top"><img src="images/temp_41.jpg" alt="" width="6" height="185" /></td>
<td valign="top"><img src="images/temp_39.jpg" alt="" width="6" height="185" /></td>
<td valign="top" bgcolor="#E6E6E6"><table width="135" height="175" border="0" align="center">
<tr>
<td height="106" colspan="2" align="center" valign="top" bgcolor="#E6E6E6"> </td>
</tr>
<tr>
<td width="42" rowspan="2" bgcolor="#FF0000"> </td>
<td width="84" bgcolor="#E6E6E6"> </td>
</tr>
<tr>
<td bgcolor="#E6E6E6"> </td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6E6E6"> </td>
</tr>
</table></td>
<td valign="top"><img src="images/temp_41.jpg" alt="" width="6" height="185" /></td>
<td valign="top"><img src="images/temp_39.jpg" alt="" width="6" height="185" /></td>
<td valign="top" bgcolor="#E6E6E6"><table width="135" height="175" border="0" align="center">
<tr>
<td height="106" colspan="2" align="center" valign="top" bgcolor="#E6E6E6"> </td>
</tr>
<tr>
<td width="42" rowspan="2" bgcolor="#FF0000"> </td>
<td width="84" bgcolor="#E6E6E6"> </td>
</tr>
<tr>
<td bgcolor="#E6E6E6"> </td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6E6E6"> </td>
</tr>
</table></td>
<td valign="top"><img src="images/temp_41.jpg" alt="" width="6" height="185" /></td>
<td valign="top"><img src="images/temp_39.jpg" alt="" width="6" height="185" /></td>
<td valign="top" bgcolor="#E6E6E6"><table width="135" height="175" border="0" align="center">
<tr>
<td height="106" colspan="2" align="center" valign="top" bgcolor="#E6E6E6"> </td>
</tr>
<tr>
<td width="42" rowspan="2" bgcolor="#FF0000"> </td>
<td width="84" bgcolor="#E6E6E6"> </td>
</tr>
<tr>
<td bgcolor="#E6E6E6"> </td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6E6E6"> </td>
</tr>
</table></td>
<td valign="top"><img src="images/temp_41.jpg" alt="" width="6" height="185" /></td>
</tr>
<tr>
<td height="14" valign="top"> </td>
<td valign="top"><img src="images/temp_47.jpg" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_48.jpg" alt="" width="138" height="5" /></td>
<td valign="top"><img src="images/temp_49.jpg" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_47.jpg" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_48.jpg" alt="" width="138" height="5" /></td>
<td valign="top"><img src="images/temp_49.jpg" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_47.jpg" alt="" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_48.jpg" alt="" width="138" height="5" /></td>
<td valign="top"><img src="images/temp_49.jpg" alt="" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_47.jpg" alt="" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_48.jpg" alt="" width="138" height="5" /></td>
<td valign="top"><img src="images/temp_49.jpg" alt="" width="6" height="5" /></td>
</tr>
<tr>
<td height="16" valign="bottom"> </td>
<td valign="bottom"><img src="images/temp_32.jpg" alt="" width="6" height="5" /></td>
<td valign="bottom"><img src="images/temp_33.jpg" alt="" width="138" height="5" /></td>
<td valign="bottom"><img src="images/temp_34.jpg" alt="" width="6" height="5" /></td>
<td valign="bottom"><img src="images/temp_32.jpg" alt="" width="6" height="5" /></td>
<td valign="bottom"><img src="images/temp_33.jpg" alt="" width="138" height="5" /></td>
<td valign="bottom"><img src="images/temp_34.jpg" alt="" width="6" height="5" /></td>
<td valign="bottom"><img src="images/temp_32.jpg" alt="" width="6" height="5" /></td>
<td valign="bottom"><img src="images/temp_33.jpg" alt="" width="138" height="5" /></td>
<td valign="bottom"><img src="images/temp_34.jpg" alt="" width="6" height="5" /></td>
<td valign="bottom"><img src="images/temp_32.jpg" alt="" width="6" height="5" /></td>
<td valign="bottom"><img src="images/temp_33.jpg" alt="" width="138" height="5" /></td>
<td valign="bottom"><img src="images/temp_34.jpg" alt="" width="6" height="5" /></td>
</tr>
<tr>
<td height="16" valign="top"> </td>
<td valign="top"><img src="images/temp_39.jpg" alt="" width="6" height="185" /></td>
<td valign="top" bgcolor="#E6E6E6"><table width="135" height="175" border="0" align="center">
<tr>
<td height="106" colspan="2" align="center" valign="top" bgcolor="#E6E6E6"><img src="images-car/20111229652รถ1..JPG" width="131" height="109" /></td>
</tr>
<tr>
<td width="42" rowspan="2" bgcolor="#FF0000"><div align="center" class="style3">09</div></td>
<td width="84" bgcolor="#E6E6E6"><strong>NISSAN</strong> </td>
</tr>
<tr>
<td bgcolor="#E6E6E6"> MARCH </td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6E6E6"> ขาย 385,000 บาท </td>
</tr>
</table></td>
<td valign="top"><img src="images/temp_41.jpg" alt="" width="6" height="185" /></td>
<td valign="top"><img src="images/temp_39.jpg" alt="" width="6" height="185" /></td>
<td valign="top" bgcolor="#E6E6E6"><table width="135" height="175" border="0" align="center">
<tr>
<td height="106" colspan="2" align="center" valign="top" bgcolor="#E6E6E6"><img src="images-car/201112314410IMG00099-20111229-2058.jpg" width="131" height="109" /></td>
</tr>
<tr>
<td width="42" rowspan="2" bgcolor="#FF0000"><div align="center" class="style3">10</div></td>
<td width="84" bgcolor="#E6E6E6"><strong>MERCEDES BENZ</strong> </td>
</tr>
<tr>
<td bgcolor="#E6E6E6"> SLK-CLASS </td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6E6E6"> ขาย 1,500,000 บาท </td>
</tr>
</table></td>
<td valign="top"><img src="images/temp_41.jpg" alt="" width="6" height="185" /></td>
<td valign="top"><img src="images/temp_39.jpg" alt="" width="6" height="185" /></td>
<td valign="top" bgcolor="#E6E6E6"><table width="135" height="175" border="0" align="center">
<tr>
<td height="106" colspan="2" align="center" valign="top" bgcolor="#E6E6E6"><img src="images-car/20111229481259203_142356499139944_100000967833968_181239_4302525_n.jpg" width="131" height="109" /></td>
</tr>
<tr>
<td width="42" rowspan="2" bgcolor="#FF0000"><div align="center" class="style3">11</div></td>
<td width="84" bgcolor="#E6E6E6"><strong>MAZDA</strong> </td>
</tr>
<tr>
<td bgcolor="#E6E6E6"> MX5 </td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6E6E6"> ขาย 1,500,000 บาท </td>
</tr>
</table></td>
<td valign="top"><img src="images/temp_41.jpg" alt="" width="6" height="185" /></td>
<td valign="top"><img src="images/temp_39.jpg" alt="" width="6" height="185" /></td>
<td valign="top" bgcolor="#E6E6E6"><table width="135" height="175" border="0" align="center">
<tr>
<td height="106" colspan="2" align="center" valign="top" bgcolor="#E6E6E6"><img src="images-car/2011122757483953-1.jpg" width="131" height="109" /></td>
</tr>
<tr>
<td width="42" rowspan="2" bgcolor="#FF0000"><div align="center" class="style3">12</div></td>
<td width="84" bgcolor="#E6E6E6"><strong>NISSAN</strong> </td>
</tr>
<tr>
<td bgcolor="#E6E6E6"> CEFIRO </td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6E6E6"> ขาย 179,000 บาท </td>
</tr>
</table></td>
<td valign="top"><img src="images/temp_41.jpg" alt="" width="6" height="185" /></td>
</tr>
<tr>
<td height="16" valign="top"> </td>
<td valign="top"><img src="images/temp_47.jpg" alt="" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_48.jpg" alt="" width="138" height="5" /></td>
<td valign="top"><img src="images/temp_49.jpg" alt="" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_47.jpg" alt="" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_48.jpg" alt="" width="138" height="5" /></td>
<td valign="top"><img src="images/temp_49.jpg" alt="" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_47.jpg" alt="" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_48.jpg" alt="" width="138" height="5" /></td>
<td valign="top"><img src="images/temp_49.jpg" alt="" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_47.jpg" alt="" width="6" height="5" /></td>
<td valign="top"><img src="images/temp_48.jpg" alt="" width="138" height="5" /></td>
<td valign="top"><img src="images/temp_49.jpg" alt="" width="6" height="5" /></td>
</tr>
</table>
<tr>
<td> </td>
<td colspan="3" bordercolor="#cfcfd0"> </td>
</tr>
<?
}
?>
<?
mysql_close($objConnect);
?>
</div>
</body>
</html>
|
|
|
|
|
Date :
2012-01-29 12:16:09 |
By :
phonlawut |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ทำได้แล้วครับพี่ ขอบคุณมากครับ ๆ
|
|
|
|
|
Date :
2012-01-29 18:53:37 |
By :
phonlawut |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|