In a form, multiple select statements exist. after the statements are submitted to the background file, how can we obtain the selected values of these select statements?

Source: Internet
Author: User
In a form, multiple select statements exist. after the statements are submitted to the background file, how can we obtain the selected values of these select statements ?? & Lt; forpolichod & quot; post & quot; action & quot; add. php? AddTeahcer & quot; & gt; & lt; selectname & quot; selteaid & quot; & gt; & nbsp; wh multiple select statements exist in a form, after the files are submitted to the background, how do I obtain the selected values of these select statements ??

In a form, multiple select statements exist. after the two select statements are submitted to the add. php file, how do I obtain the selected values of the two select statements ??

------ Solution --------------------
$ _ POST ['selteaid '];
$ _ POST ['claid'];


------ Solution --------------------
Is the action parameter in form useful?
If useful:
If (isset ($ _ GET ['addteahcer ']) {
Echo "drop-down menu 1 -->"; print_r ($ _ POST ['selteaid ']); echo"
";
Echo "drop-down menu 1 -->"; print_r ($ _ POST ['claid']); echo"
";
}
The premise is that the drop-down menu on your front-end page has the selected value:
While ($ row = mysql_fetch_array ($ result2 )){If ($ row ['id'] = 1 ){Echo"". $ Row ['id']."";} Else {Echo"". $ Row ['id']."";}}
------ Solution --------------------
Different select attributes have different settings. then, you can use $ _ POST to obtain
------ Solution --------------------

Background$ _ POST ['A']$ _ POST ['B']$ _ POST ['c']

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.