<form method="post" action="" name="s1" id="s1"> <? $sql= "SELECT * FROM tbl_car"; $query = mysql_query($sql) or die (); ?> <select name="s" onchange="s1.sel.value= this.value"> <? while($result = mysql_fetch_array($query)) { ?> <option value="<?=$result["value"];?>"><?=$result["car_title"];?></option> <? } ?> </select> <input type="text" name="sel" /> </form>
echo '<pre>'; print_r($_POST); echo '</pre>';
<form method="post" action="" name="s1" id="s1"> <select name="s" onchange="s1.sel.value= this.value"> <option value="111">111</option> <option value="222">222</option> </select> <input type="text" name="sel" /> </form>
<option value="ตรงนี้ดูว่ามีค่ามารึเปล่า">111</option>
<option value="<?=$result["value"];?>"><?=$result["car_title"];?></option>
<option value="test"><?=$result['car_title'];?></option>
<form method="post" action="" name="s1" id="s1"> <? $sql= "SELECT * FROM tbl_car"; $query = mysql_query($sql) or die (); ?> <select name="s" onchange="s1.sel.value= this.value"> <? while($result = mysql_fetch_array($query)) { ?> <option value="xxx"><?=$result["car_title"];?></option> <? } ?> </select> <input type="text" name="sel" /> </form>
<table width="100" border="1" class="style1"> <tr> <th scope="col"><p>ข้อมูลรถ</p> <table width="100" border="1" class="style1"> <tr> <th scope="col"><div align="center">ยี่ห้อ/รุ่น</div></th> <th scope="col"><div align="center">จำนวน</div></th> <th scope="col"><div align="center">วันที่จอง</div></th> <th scope="col"><div align="center">วันที่รับรถ</div></th> </tr> <tr> <td><div align="center"> <? $sql= "SELECT * FROM tbl_car"; $query = mysql_query($sql) or die (); ?> <select name="service" id="service"> <? while($result = mysql_fetch_array($query)) { ?> <option value="<?=$result["value"];?>"><?=$result["car_title"];?></option> <? } ?> </select> </div><input type="text" value="<?php print $arrData[0][15];?>" id="type" name="type"/></td> <td><div align="center"><input type="text" value="<?php print $arrData[0][6];?>" id="type" name="type"/></div></td> <td><div align="center"><input type="text" value="<?php print $arrData[0][13];?>" id="type" name="type"/></div></td> <td><div align="center"><input type="text" value="<?php print $arrData[0][7];?>" id="type" name="type"/></div></td> </tr> </table>
<? $sql= "SELECT * FROM tbl_car"; $query = mysql_query($sql) or die (); ?> <select name="service" id="service"> <? while($result = mysql_fetch_array($query)) { ?> <option value="<?=$result["value"];?>"><?=$result["car_title"];?></option> <? } ?> <? print_r($result); exit;?> </select>
<?php $result = array('111','222','333','444','555','666'); ?> <form method="post" action="" name="s1" id="s1"> <select name="s" onchange="s1.sel.value= this.value"> <?php foreach($result as $values):?> <option value="<?=$values?>"><?=$values?></option> <?php endforeach;?> </select> <input type="text" name="sel" /> </form>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง