<form action="" method="GET" name="field_edit"> <p> </p> <table width="385" height="88" class="" align=""> <tr class="data"> <th width="57" height="35" class="data">สนาม</th> <th width="106" class="data">อัตราค่าบริการ / ชั่วโมง</th> <th width="106" class="data">ปรับอัตราค่าบริการ</th> </tr> <?php $q1=mysql_query("SELECT * FROM field GROUP BY field_name") or die (mysql_error()); while ($row=mysql_fetch_array($q1)){ ?> <tr class="data"> <td class="data" align="center"><?= $row['field_name']; ?></td> <td class="data" align="center"><?= number_format($row['price'])." "." บาท"; ?></td> <td class="data" align="center"><a href="javascript:MM_openBrWindow('rate_edit.php?up_id=<?=$row['field_name']?>','','width=300,height=150')">แก้ไข</a></td> <?php } ?> </table><br> <h4> </h4> <table width="101" height="67" align="" class=""> <tr class="data"> </tr> </table> </form>
<?php $get = $_GET['up_id']; include("../include/connection.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>ปรับอัตราค่าบริการ</title> <link rel="shortcut icon" href="../admin/stylesheet/img/devil-icon.png"> <link rel="stylesheet" type="text/css" href="../css/mos-style.css"> </head> <body> <?php $q1=mysql_query ("SELECT * FROM field WHERE field_name='$get' ") or die (mysql_error()); $r1=mysql_fetch_array ($q1); ?> <form action="" method="GET"> <h3>ปรับอัตราค่าบริการสนามฟุตบอล</h3> <h3>สนามที่ <?= $r1['field_name'] ?> </h3> <h3>ราคา <input name="txtPrice" type="text" value="<?= $r1['price'] ?>" class="pendek"/> <input name="btnEdit" type="submit" value="ตกลง" class="button" onclick="return confirm('ยืนยัน')"/> <input name="btnExit" type="submit" value="ออก" class="" /> </h3> <?php if ($_GET['btnExit']) { echo "<script type='text/javascript'> window.close(); </script>"; echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=rate.php \">"; } if ($_GET['btnEdit']) { $price= $_GET['txtPrice']; mysql_query ("UPDATE field SET price = '$price' WHERE field_name = '$get' ") or die (mysql_error()); echo "<script type='text/javascript'> window.close(); </script>"; echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=rate.php \">"; } ?> </form> </body> </html>
if ($_GET['btnEdit']) { $price= $_GET['txtPrice']; $CHECK = "UPDATE field SET price = '$price' WHERE field_name = '$get' "; echo $CHECK; die(); mysql_query ("UPDATE field SET price = '$price' WHERE field_name = '$get' ") or die (mysql_error()); echo "<script type='text/javascript'> window.close(); </script>"; echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=rate.php \">"; }
if ($_GET['btnEdit']) { $price= $_GET['txtPrice']; $get = $_GET['up_id']; $CHECK = "UPDATE field SET price = '$price' WHERE field_name = '$get' "; echo $CHECK; die(); mysql_query ("UPDATE field SET price = '$price' WHERE field_name = '$get' ") or die (mysql_error()); echo "<script type='text/javascript'> window.close(); </script>"; echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=rate.php \">"; }
<input name="up_id" type="hidden" value="<?= $get ?>" class="pendek"/> <input name="txtPrice" type="text" value="<?= $r1['price'] ?>" class="pendek"/> <input name="btnEdit" type="submit" value="ตกลง" class="button" onclick="return confirm('ยืนยัน')"/> <input name="btnExit" type="submit" value="ออก" class="" />
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง