<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <? $product_id=$_POST['product_id']; $product_name=$_POST['product_name']; $product_detail=$_POST['product_detail']; $price=$_POST['price']; $file=$_POST['file']; include "config.php"; $sql="update tbproduct set product_id='$product_id',product_name='$product_name',product_detail='$product_detail',price='$price',file='$file' where product_id='$product_id'"; echo $sql; $query=mysql_query($sql); if($query){ echo"<center>แก้ไขข้อมูลสำเร็จ</center>"; echo"<meta http-equiv=refresh content=100;url=showproduct.php>"; } else{ echo"<center>ไม่สามารถเเก้ไขข้อมูล</center>"; } ?> </body> </html>
update tbproduct set product_id='' ,product_name='aa' ,product_detail='aa' ,price='11111' ,file='DSC07003.JPG' where product_id=''
<? include"checksession.php"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <? $product_id=$_GET['product_id']; include "config.php"; $sql="select * from tbproduct where product_id=$product_id"; $query=mysql_query($sql); $dom=mysql_fetch_array($query); ?> <form id="form2" name="form2" method="post" action="editproduct_in.php"> <div align="center"> <table width="500" border="1" bgcolor="#66FFFF"> <tr> <th colspan="2" bgcolor="#0099FF" scope="col">แก้ไขรายการสินค้า</th> </tr> <tr> <td width="189">รหัสสินค้า</td> <td width="295"><label> <? echo $product_id ?> </td> </tr> <tr> <td>ชื่อสินค้า</td> <td><label> <input name="product_name" type="text" id="product_name" value="<? echo $dom['product_name'] ?>" /> </label></td> </tr> <tr> <td>รายละเอียด</td> <td><label> <textarea name="product_detail" cols="20" id="product_detail"><? echo $dom['product_detail'] ?></textarea> </label></td> </tr> <tr> <td>ราคา</td> <td><label> <input name="price" type="text" id="price" value="<? echo $dom['price'] ?>" /> </label></td> </tr> <tr> <td>รูปสินค้า</td> <td><img src="../admin/ProductPhoto/<?=$dom["file"];?>" /></td> <tr> </tr> <tr> <td valign="top"> </td> <td><input name="file" type="file" class="txtbox" id="file"></td> </tr> </table> </div> <p align="center"> <label> <input type="submit" name="Submit" value="ตกลง" /> </label> <input type="reset" name="Submit2" value="ลบ" /> <input type="hidden" name="product" value=" <? echo $dom['product_id'];?> " /> </p> </form> <p align="center"><a href="showproduct.php">กลับสู่หน้าหลัก</a> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง