How to get the value from the php drop-down menu-php Tutorial

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.