<!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=windows-874" /> <title>Untitled Document</title> </head> <body> <form id="form1" name="form1" method="post" action="savefield.php"> <p>ตารางการเช่าคอร์ด - อุปกรณ์</p> <table width="686" height="497" border="1"> <tr> <td width="171"> </td> <td width="293"><label for="name"></label></td> </tr> <tr> <td>ค้นหาข้อมูลสมาชิก</td> <td><input type="text" name="find" id="find" /> <input type="submit" name="button2" id="button2" value="search" onClick="this.form.action='search_rent.php'; submit()" /> </tr> <tr> <td colspan="2"><table width="678" height="226" border="1"> <tr> <td width="298">รหัสลูกค้า</td> <td colspan="3"><? echo " $cus_id" ;?></td> </tr> <tr> <td>Username</td> <td width="101"><? echo "$cus_username"; ?> <td width="91">Password</td> <td width="158"><? echo "$cus_pass"; ?></td> </tr> <tr> <td>Name</td> <td><? echo "$cus_name"; ?></td> <td>Lastname</td> <td><? echo "$cus_lname"; ?></td> </tr> <tr> <td>E-mail</td> <td><? echo "$cus_email"; ?></td> <td>Phone</td> <td><? echo "$cus_phone"; ?></td> </tr> <tr> <td>Address</td> <td colspan="3"><? echo "$cus_address"; ?></td> </tr> </table></td> </tr> <tr> <td height="42"><label for="datacourt"></label> เลือกคอร์ด <select name="datacourt" id="datacourt"> <? include("connec.php"); mysql_connect($hostname,$user,$password)or die("Cant Connect"); mysql_select_db($dbname)or die ("Out of data"); $sql = "SELECT court_name FROM court"; $result = mysql_query($sql); while ($datacourt = mysql_fetch_array($result) ) { echo "<option value=$datacourt[court_name]>$datacourt[court_name]</option>"; } ?> </select></td> <td>กรอกจำนวน <input type="text" name="price" id="price" /></td> </tr> <td><label for="dataeq"></label> เลือกอุปกรณ์ <select name="dataeq" id="dataeq"> <? include("connec.php"); mysql_connect($hostname,$user,$password)or die("Cant Connect"); mysql_select_db($dbname)or die ("Out of data"); $sql = "SELECT eq_name FROM eq"; $result = mysql_query($sql); while ($dataeq = mysql_fetch_array($result) ) { echo "<option value=$dataeq[eq_name]>$dataeq[eq_name]</option>"; } ?> </select></td> <td>กรอกจำนวน <input type="text" name="price" id="price" /></td> </tr> <td><label for="datacus"></label></td> <td> </td> </tr> <tr> <td><input type =Hidden name=Action value="Add" /> <td><input type="submit" name="Submit" id="button" value="Add Data" /></td> </tr> </table> <p> </p> </form> <form id="form2" name=""frmMain"" method="post" action="page.php"> <table width="860" height="197" border="1"> <tr> <td width="231">เลือกช่วงเวลา</td> <td width="172"> <select name="lmName1" OnChange="window.location='?item='+this.value;"> <option value=""><-- Please Select Item --></option> <?php $strSQL = "SELECT court_time FROM court group BY court_time ASC"; $objQuery = mysql_query($strSQL); while($objResult = mysql_fetch_array($objQuery)) { if($_GET["item"] == $objResult["court_time"]) { $sel = "selected"; } else { $sel = ""; }?> <option value="<?php echo $objResult["court_time"];?>" <?php echo $sel;?>> <?php echo $objResult["court_time"];?></option> <?php } ?> </select> </td> </tr> <tr> <td colspan="4"> <? if($_GET["item"] != ""){ $sql1 = "select * from court where court_time = '".$_GET["item"]."'"; $dbquery = mysql_query($sql1); $num_rows = mysql_num_rows($dbquery); $i=0; while ($i < $num_rows) { $result = mysql_fetch_array($dbquery); $court_name = $result[court_name]; $court_type = $result[court_type]; $court_time = $result[court_time]; $court_price = $result[court_price]; $court_status = $result[status]; echo "<tr><td>$court_name</td><td>$court_type</td><td>$court_time</td><td>$court_price</td><td>$court_status</td></tr> "; $i++; } } ?></td> </tr> </table> </form> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง