How does one obtain the value from the php drop-down menu? The drop-down menu associates a field in a data table. This field stores the names of several other databases. select a value in the drop-down list, such as 0004 (that is, the name of another database ), how to obtain and open the database as a variable? ------ Solution ------------------ 1. use js to obtain the value selected in the list. how can I obtain the value from the php drop-down menu after uploading it?
The drop-down menu associates a field in a data table. This field stores the names of several other databases. select a value in the drop-down list, such as 0004 (that is, the name of another database ), how to obtain and open the database as a variable?
------ Solution --------------------
1. use js to obtain the value selected in the list and upload it to the backend for processing.
2. the backend finds the corresponding access password and IP address from the data table or configuration file based on this value.
------ Solution --------------------
3. create a link based on the database name, password, and IP address.
------ Solution --------------------
If you do not need js, you can encapsulate the data into an array and traverse it to obtain the display.
------ Solution --------------------
$ Test = @ $ _ POST ['select2']; // -------- This is the key
Echo $ test; you will know what the value is.