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