PHP Get the form all check box value method, php get form check box _php tutorial

Source: Internet
Author: User

PHP Get the form all check box value method, php get form check box


In general, PHP always gets the value of the last check box, so how can I get the value of all the checkboxes?

The solution is as follows:

The part code for the form form is as follows:

12345

The code for the PHP processing post to pass over the data is as follows:

$str _tag = ""; $frm _tag = $_post[' Frm_tag '];for ($i =0; $i
 
  
"; if ($i ==0) $str _tag = $frm _tag[$i]; else $str _tag = $str _tag. ",". $frm _tag[$i];} echo $str _tag;}

It is believed that this article has certain reference value for us to master PHP program design in depth.


PHP form problems How to get check box data

Yes, the checkbox in the form is not committed without a choice.
So it's a hint.
=========
You can judge the output again.
if (Isset ($_post["Orange"])) echo $_post["Orange"];

How does the php form form post get checkbox values and put them into the database?

Wow, I just did this, the checkbox is an array, you're going to put them in the array.
The principle is: pass those values over. and turn them into non-arrays.
Like what:
29
30
31
32
These forms
$waistline =$_post["waistline"];
$myallsport = Implode (",", $waistline);

So insert the $myallsport this into the inside of the O

http://www.bkjia.com/PHPjc/871102.html www.bkjia.com true http://www.bkjia.com/PHPjc/871102.html techarticle PHP Gets the value of all the check boxes of the form, the PHP get form check box generally, PHP is always only get the last check box value, then how to get all the check box value ...

  • 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.