<table width="1202" height="784" border="00" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="10"><form id="form1" name="form1" method="post" action="<? $_SERVER['PHP_SELF']?>"> <? $id= $_GET['id']; $sql = "select * from bikeshop where No = '$id';"; $qry = mysqli_query($con,$sql); $result = mysqli_fetch_array ($qry); ?> <table width="1201" height="34" border="0"> <tr> <td width="815" align="right"><h4></h4></td> <td width="272">admin</td> <td width="100" align="right"><h4><a href="../index.php">ออกจากระบบ</a></h4></td> </tr> </table> </form></td> </tr> <tr> <td height="218" bgcolor="#FFFFFF" background="nameshop.jpg"></td> </tr> <tr> <td height="10"> </td> </tr> <tr> <td height="479" align="center" valign="top" bgcolor="#D6D6D6"><form id="form2" name="form2" method="post" action=""> <p> </p> <table width="441" height="454" border="1" align="center"> <tr> <td width="104" bgcolor="#C0C0C0">No :</td> <td width="327" bgcolor="#C0C0C0"><? echo $result['No']?> </td> </tr> <tr> <td bgcolor="#C0C0C0">ชื่อสินค้า :</td> <td bgcolor="#C0C0C0"><input name="name3" type="text" id="name3" value="<? echo $result['Namebike']; ?>" /></td> </tr> <tr> <td bgcolor="#C0C0C0">ราคา :</td> <td bgcolor="#C0C0C0"><input name="Price" type="text" id="Price" value="<? echo $result['Price']; ?>" /></td> </tr> <tr> <td bgcolor="#C0C0C0">รายละเอียด :</td> <td bgcolor="#C0C0C0"><input name="Detail" type="text" id="Detail" value="<? echo $result['Detail']; ?>" /> </tr> <tr> <td bgcolor="#C0C0C0">รูป:</td> <td bgcolor="#C0C0C0"> <input name="Pic" type="text" id="Pic" value="<? echo $result['Pic']; ?>" /> </td> </tr> <tr> <td bgcolor="#C0C0C0"> </td> <td bgcolor="#C0C0C0"><input type="submit" name="button3" id="button3" value="ยืนยัน" /> <input type="submit" name="button4" id="button4" value="ยกเลิก" /></a></td> </tr> </table> <? if($_POST['button3']) { $No= $_POST[No] ; $Namebike= $_POST[name3] ; $Price = $_POST[Price] ; $Detail = $_POST[Detail] ; $Pic = $_POST[Pic] ; $sql = "UPDATE `bikeshop` SET `No` = '$No',`Namebike` = '$Namebike',`Price` = '$Price',`Detail` = '$Detail',`Pic` = '$Pic' WHERE CONVERT( `bikeshop`.`No` USING utf8 ) = '$id';"; $qry = mysqli_query($con,$sql); echo "<script language='JavaScript'>"; echo "alert('ข้อมูลถูกปรับปรุงเรียบร้อยแล้วคะ');"; echo"</script>"; echo "<script type='text/javascript'> window.location = 'admineditbike.php'</script>"; } else if($_POST['button4']) { echo "<script type='text/javascript'> window.location = 'adminindex.php'</script>"; } ?> <p> </p> </form></td> </tr> </table> <p> </p> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง