Home > Backend Development > PHP Tutorial > PHP's simple way to get the check box value. PHP calls the parent class method. PHP learning introductory method. PHP calls the class method.

PHP's simple way to get the check box value. PHP calls the parent class method. PHP learning introductory method. PHP calls the class method.

WBOY
Release: 2016-07-29 08:49:41
Original
920 people have browsed it

The example in this article describes how to simply obtain the check box value in PHP. Share it with everyone for your reference, the details are as follows:

html:

<form 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" value="提交" />
</form>

Copy after login

php:

<&#63;php
$text1=$_POST['checkbox'];
for($i=0;$i<count($text1);$i++)
{
$yourwant = $text1[$i]; 
echo $yourwant."<br/>";
}
?>

Copy after login

Readers who are interested in more PHP related content can check out the special topics of this site: "php socket usage summary", " Summary of PHP Network Programming Skills", "Summary of PHP Curl Usage", "Complete PHP Array (Array) Operation Skills", "PHP Data Structure and Algorithm Tutorial", "Summary of PHP Mathematical Operation Skills", "Summary of PHP Date and Time Usage" , "php object-oriented programming introductory tutorial", "php string (string) usage summary", "php + mysql database operation introductory tutorial" and "php common database operation skills summary"

I hope that this article will help everyone with PHP programs Design helps.

The above introduces the simple method of obtaining the check box value in PHP, including the methods of PHP. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template