<?php include "connect.php" ?> <html> <head> <title> ระบบร้านขายดอกไม้ออนไลน์</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body topmargin="0" leftmargin="0"> <table width="850" border="0" cellpadding="10"> <tr> <td width="250"><h3>ร้านขายดอกไม้ออนไลน์</h3> <p>[ <a href="index.php">หน้าแรก</a> ] [ <a href="basket.php">ดูตะกร้าสินค้า</a> ]</p> </td> <td width="550"> </td> </tr> <tr> <td อalign="top">ประเภทสินค้า <? include "type_menu.php"; ?> </td> <td width="550"> <table width="450" border="0" align="center" cellpadding="15"> <? $id = $_GET["id"]; $sql = "select * from product where type_id = $id"; $ex = mysql_query($sql); while ($rs=mysql_fetch_array($ex)); { ?> <tr> <td width="100" valign="top"><img src="image/<?=$rs[product_image]?>" width="100"></td> <td> <? $product_id= $rs[product_id]; $code = sprintf("%05d",$product_id); ?> <b> รหัสสินค้า : </b> <?=$code?> <br> <b> ชื่อสินค้า : </b> <?=$product_name?><br> <b>ราคา : </b> <?=$product_price?>บาท<br> <br> [ <a href="product_detail.php?id=<?=$rs[product_id]?>">แสดงรายละเอียด</a>] [ <a href="basket_add.php?id=<?=$rs[product_id]?>">หยิบใส่ตะกร้า</a> ] </td> </tr> <? } ?> </table> </td> </tr> </body> </html>
Quote:25.$ex = mysql_query($sql) or die(mysql_error()); 26.while ($rs=mysql_fetch_array($ex)); 27.{ 28.?> 29.<tr> 30.<td width="100" valign="top"><img src="image/<?=$rs["product_image"]?>" width="100"></td> 31.<td> 32.<? 34.$code = sprintf("%05d",$rs["product_id"]); 35.?> 36.<b> รหัสสินค้า : </b> <?=$code?> <br> 37.<b> ชื่อสินค้า : </b> <?=$rs["product_name"]?><br> 38.<b>ราคา : </b> <?=$rs["product_price"]?>บาท<br>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง