php - Getting the text of the dropdown menu with using submit -


i wanna ask guys if there anyway can value of dropdown , pass php file without using way? way have options in menu coming database code on dropdown menu

mysql_connect("localhost", "root" , ""); mysql_select_db("hotelgal"); $query3 = "select suite_code tblsuite suite_name = '".$suitename."'"; $result3 = mysql_query($query3); $row3 = mysql_fetch_assoc($result3); $suite = $row3['suite_code']; mysql_connect("localhost", "root" , ""); mysql_select_db("hotelgal"); $queryroom = "select * tblroom room_accommodation = '" . $suite . "' , status = 'available'";     $resultroom = mysql_query($queryroom); if ($resultroom && mysql_num_rows($resultroom) > 0) { echo '<form name = "room" method = "get" action = "reserveupdate.php">'; echo '<select name = "room" id = "rooms">'; while($rows = mysql_fetch_assoc($resultroom)) { echo '<option>' . $rows['room_no'] . '</option>'; } echo '</select></form>'; } 

i have no problem on one, problem trying select text of dropdown , pass php file have code

if (isset($_get['room'])){ $query = "update tblreserve set room_no = '" .$_get['room']. "', status = 'approved' reservation_code = '" . $reser . "'"; $res = mysql_query($query); $query2 = "update tblroom set status = 'occupied' room_no = '" . $_get['room'] . "'"; $res2 = mysql_query($query2); echo "<script>alert('reservee approved!'); window.location = './adminreserve.php';</script>"; } 


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -