<? session_start(); if ((empty($_SESSION["username"])) or (empty($_SESSION["password"]))){ header("location:admin.htm"); exit; } include "admin_menu.php"; ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <html> <body><br><br> <p align="center">แสดงข้อมูลสินค้า</p> <table width="700" border="1" align="center"> <tr bgcolor="#00CCCC" align="center"> <td>รหัสสินค้า</td> <td>ชื่อสินค้า</td> <td>ประเภทสินค้า</td> <td>ราคา</td> <td>รูปภาพ</td> <td>แก้ไข</td> <td>ลบ</td> </tr> <? include "connect.php"; $sql = "select * from product inner join product_type where product.type_id = product_type.type_id order by product_id desc "; $ex = mysql_query($sql, $conn); while($rs=mysql_fetch_array($ex)) { ?> <tr align="center"> <td><?=$rows[product_id]?></td> <td><?=$rows[product_name]?></td> <td><?=$rows[type_name]?></td> <td><?=$rs[product_price]?></td> <td><img src="images/<?=$rs[product_image]?>" width="80"></td> <td><a href=admin_edit1_product.php?id=<?=$rs[product_id]?>>แก้ไข </a></td> <td><a href=admin_delete_product.php?id=<?=$rs[product_id]?> onclick="return confirm('ยืนยันการลบข้อมูล?')">ลบ</a></td> </tr> <? } mysql_close($conn); ?> </table> <p> </p> </body> </html>
select * from product inner join product_type where 27.product.type_id = product_type.type_id order by product_id desc
while($rs=mysql_fetch_array($ex)) {
<? session_start(); if ((empty($_SESSION["username"])) or (empty($_SESSION["password"]))){ header("location:admin.htm"); exit; } include "admin_menu.php"; ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <html> <body><br><br> <p align="center">แสดงข้อมูลสินค้า</p> <table width="700" border="1" align="center"> <tr bgcolor="#00CCCC" align="center"> <td>รหัสสินค้า</td> <td>ชื่อสินค้า</td> <td>ประเภทสินค้า</td> <td>ราคา</td> <td>รูปภาพ</td> <td>แก้ไข</td> <td>ลบ</td> </tr> <? include "connect.php"; $sql = "select * from product inner join product_type where product.type_id = product_type.type_id order by product_id desc "; $ex = mysql_query($sql, $conn); while($rs=mysql_fetch_array($ex)) { ?> <tr align="center"> <td><?=$rs['product_id']?></td> <td><?=$rs['product_name']?></td> <td><?=$rs['type_name']?></td> <td><?=$rs['product_price']?></td> <td><img src="images/<?=$rs['product_image']?>" width="80"></td> <td><a href=admin_edit1_product.php?id=<?=$rs['product_id']?>>แก้ไข </a></td> <td><a href=admin_delete_product.php?id=<?=$rs['product_id']?> onclick="return confirm('ยืนยันการลบข้อมูล?')">ลบ</a></td> </tr> <? } mysql_close($conn); ?> </table> <p> </p> </body> </html>
<table width="100%" border="1"> <tr> <td>username</td> </tr> <?php include("connect.php"); $result = mysql_query("SELECT * FROM tbluser"); while($row = mysql_fetch_array($result)) {?> <tr> <td><? echo $row['username'];?></td> </tr> <? } ?> </table> <? mysql_close($con); ?>
<?php include("connect.php"); $result = mysql_query("SELECT * FROM tbluser"); while($row = mysql_fetch_array($result)) { echo $row['username']."".$row['password']."<br/>"; } ?>
<?php include("connect.php"); $result = mysql_query("SELECT * FROM tbluser"); while($row = mysql_fetch_array($result)) { echo "<TR>"; echo "<TD>"; echo $row['username']."".$row['password']; echo "</TD>"; echo "</TR>"; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง