<?php require('conn_mysql.php'); $sql="select * from master_tour_table"; $query = mysql_query($sql); while($resule = mysql_fetch_array($query)) { $title = $resule['title']; $tourID = $resule['tourID']; ?> <input type="radio" name="tourID" id="tourID" value="<?php echo $tourID; ?>" onClick="this.form.to_tour.value = this.value"><?php echo $title; ?><br> <?php }?> <input name="to_tour" type="text" id="to_tour" size="15"/>
<?php require('conn_mysql.php'); $sql="select * from master_tour_table"; $query = mysql_query($sql); while($resule = mysql_fetch_array($query)) { $title = $resule['title']; $tourID = $resule['tourID']; ?> <input type="radio" name="tourID" id="tourID" value="<?php echo $tourID; ?>" onClick="this.form.to_tour.value = this.value"><?php echo $title; ?><br> <?php }?> <div id="showQuery" style="background-color:lightgray;width:400px;height:200px;overflow:auto"></div> <script> $("#tourID").click(function(){ var selectedTourID = $("#tourID :checked").val(); $.post("getTourInfo.php" , {to_tour:selectedTourID} , function(data){ $("#showQuery").empty().append(data); }); }); </script>
<?php echo "select * from tourInfo where tour_id='{$_POST["to_tour"]}' "; ?>
<script language="JavaScript"> function resutName(tourID) { switch(tourID) { <?php require('conn_mysql.php'); $strSQL = "SELECT * FROM master_tour_table"; $objQuery = mysql_query($strSQL); while($objResult = mysql_fetch_array($objQuery)) { ?> case "<?php echo $objResult["tourID"]; ?>": frmMain.txtName.value = "<?php echo $objResult["destination"]; ?>"; break; <?php } ?> default: frmMain.txtName.value = ""; } } </script> <form action="page.php" method="post" name="frmMain"> <?php $sql="select * from master_tour_table"; $query = mysql_query($sql); while($resule = mysql_fetch_array($query)) { $title = $resule['title']; $tourID = $resule['tourID']; ?> <input type="radio" name="tourID" id="tourID" value="<?php echo $tourID; ?>" OnChange="resutName(this.value);"><?php echo $title; ?><br> <?php }?> <input name="txtName" type="text" value=""> </form>
<?php require('conn_mysql.php'); $sql="select * from master_tour_table"; $query = mysql_query($sql); while($resule = mysql_fetch_array($query)) { $title = $resule['title']; $tourID = $resule['tourID']; ?> <input type="radio" name="tourID" id="tourID" value="<?php echo $tourID; ?>" /><?php echo $title; ?><br> <?php }?> <div id="showQuery" style="background-color:lightgray;width:200px;height:1.8em;color:yellow;font-size:1.2em;"></div> <script> $("#tourID").click(function(){ var selectedTourID = $("#tourID :checked").val(); $.post("getTourInfo.php" , {to_tour:selectedTourID} , function(data){ $("#showQuery").empty().append(data); }); }); </script>
<?php require('conn_mysql.php'); $strSQL = "SELECT * FROM master_tour_table where tourID='{$_POST["to_tour"]}' "; $objQuery = mysql_query($strSQL); $objResult = mysql_fetch_array($objQuery); echo $objResult["destination"]; ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง