The example in this article describes a simple way to get a check box value from PHP. Share to everyone for your reference, specific as follows:
Html:
<form id= "Form1" Name= "Form1" method= "Post" action= "checkbox.php" >
<input type=checkbox name=checkbox[] Value= "1" >
<input type=checkbox name=checkbox[] value= "2" >
<input type=checkbox name=checkbox[] Value= "3" >
<input type=checkbox name=checkbox[] value= "4" >
<input type=checkbox name=checkbox[] Value= "5" >
<input type= "Submit" name= "button" id= "checkbox" value= "Submit"/>
</form>
Php:
<?php
$text 1=$_post[' checkbox '];
For ($i =0 $i <count ($text 1); $i + +)
{
$yourwant = $text 1[$i];
echo $yourwant. " <br/> ";
}
? >
More about PHP Interested readers can view the site topics: "PHP Socket Usage Summary", "PHP Network Programming Skills Summary", "Php Curl Usage Summary", "PHP Array" operation Skills Encyclopedia, "PHP Data structure and algorithm tutorial", " PHP Mathematical Arithmetic skills Summary, "PHP Date and Time usage summary", "PHP object-oriented Programming Introduction Course", "PHP string (String) Usage Summary", "Php+mysql Database operation Introduction Tutorial" and "PHP common database Operation skill Summary"
I hope this article will help you with the PHP program design.