How does the data in the drop-down list dynamically read the content of database fields? Select & nbsp; namecp_kh & nbsp; & gt; & nbsp; & lt; option & nbsp; value {$ row [$ I]} & gt; & lt; option & gt; & lt; select & gt; how can I dynamically read the database fields from the drop-down list?
Select name = "cp_kh" id = "selModule">
When you click the drop-down list, the data in the drop-down list is dynamically retrieved from the database. How can I get the data of all rows under a field from the database table to the drop-down list. The drop-down list is arranged by a row of read data. Php reads data table fields and assigns values to the read data drop-down list. (How to implement it ?) For example,
PHP database
------ Solution --------------------
Vehicle type
$ SQL = "select * from cartype ";
$ Query = mysql_query ($ SQL );
While ($ result = mysql_fetch_array ($ query )){
?>
}
?>