Php+mysql Implementing a drop-down box to display database information
<title>Classroom</title>
Crms-classroom
1. I want to enter the classroom number in the first box, and the second box displays the contents of the CID of the Course2 table in the database by the drop-down box.
This should be wrong, there is no clue, do not know how to achieve. For detailed code!
2, how to achieve the completion of one of the data (that is, do not fill two) you can query data?
------Solution--------------------
For reference only:
PHP Code
Error: ". Mysql_error ()); if (mysql_affected_rows () > 0) {$titles = array (); while ($rows = Mysql_fetch_array (MYSQL_ASSOC)) {Array_push ($titles, $rows); }}?>
Error: ". Mysql_error ()); if (mysql_affected_rows () > 0) {$arrMenu =array (); while ($rows = Mysql_fetch_array (MYSQL_ASSOC)) {Array_push ($arrMenu, $rows); }} mysql_close (); if (!empty ($arrMenu)) {echo]"; foreach ($arrMenu as $item 2) {echo "{$item 2[' name ']} "; } echo ""; }}?>