In general, PHP always gets the value of only the last check box, so how do you get the value of all the check boxes?
The solution is as follows:
Part of the code for the form form is as follows:
<input type= "checkbox" Name= "frm_tag[]" value= "1" >1 <input "
checkbox" type= "Name=" "frm_tag[" 2 " >2
<input type= "checkbox" Name= "frm_tag[]" value= "3" >3 <input "
checkbox" type= "Name=" Value= "4" >4
<input type= "checkbox" Name= "frm_tag[]" value= "5" >5
The code that the PHP process post passes over the data is as follows:
$str _tag = "";
$frm _tag = $_post[' Frm_tag '];
For ($i =0 $i <count ($frm _tag), $i + +) {
echo $frm _tag[$i]. " <br> ";
if ($i ==0)
$str _tag = $frm _tag[$i];
else
$str _tag = $str _tag. ",". $frm _tag[$i];
echo $str _tag;
}
I believe that this article on the in-depth master of the PHP program design has a certain reference value.