Php get $ _ POST parameter array with the same name _ PHP Tutorial

Source: Internet
Author: User
Php obtains the $ _ POST parameter array with the same name. When I wrote php today, I found that $ _ POST [arr] could not obtain the arr array parameter. record it. For example, if the following form needs to be submitted: inputtypecheckboxnamearrvalueinputtype when I wrote php today, I found that $ _ POST ["arr"] could not obtain the array of the arr parameter. record it.

For example, you need to submit the following forms:

  

  

  

  

You can use $ _ POST ["arr"] to obtain only the values of the last selected check boxes. to obtain the values of all selected check boxes, modify the form to the following:

  

  

  

  

In this way, you can use $ _ POST ["arr"] to obtain all the selected checkbox values.

Parameters "arr"] the array of the arr parameter cannot be obtained. record it. For example, you need to submit the following form: input type = "checkbox" name = "arr" value = ""/input type...

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.