How to obtain the id of the value cyclically generated from the up-pull box

Source: Internet
Author: User
For more information about how to obtain the id of the value cyclically returned from the drop-down box, the data in the drop-down box is obtained from the following code: & lt; selectname = & quot; name & quot; & gt; & lt ;? Phpwhile ($ row_all = mysql_fetch_array ($ query_all)
The data in the my drop-down box is obtained from the database cyclically as follows:
While ($ row_all = mysql_fetch_array ($ query_all) {?>
I put it in form. after submission, I want to get the id of the selected content

Then how can I get it on the next page? maybe the id attribute in my drop-down box is not added. I don't know how to add it. please kindly advise. thank you.


------ Solution --------------------
How does the title obtain the id of the cyclically generated value from the drop-down box? Then you can assign the id in the loop.

$ I = 0;
While ($ row_all = mysql_fetch_array ($ query_all) {?>


$ I ++;



Make a hidden js trigger on this page. you have to look for the specific code. I am not familiar with js. I forgot the details and cannot mislead you.
Function addid (){// Obtain the selected id// Write a hidden value
}

In this way, the selectid will be passed when the form is submitted... but what is the significance of passing this id?



------ Solution --------------------
While ($ row_all = mysql_fetch_array ($ query_all) {?>

Receive Page $ _ POST ['name.

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.