php Get checkbox form value program code_PHP tutorial

WBOY
Release: 2016-07-13 17:15:30
Original
793 people have browsed it

This article will introduce to you the program code for obtaining the value of the checkbox form in PHP. Friends who need to know more can enter it for reference. Because there is a difference between the checkbox attributes and input, I will introduce it here.


Suppose we have an html page with the following code:

The code is as follows
 代码如下 复制代码








Copy code

 代码如下 复制代码

echo implode(",",$_POST['test']);
?>

Pay attention to the name attribute of the input above. The content of each attribute is the same, and they are all test[]. The reason for adding [] is to transfer the content of test into an array. The code content of checkTest.php is as follows:
The code is as follows Copy code
echo implode(",",$_POST['test']); ?>
http://www.bkjia.com/PHPjc/628789.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/628789.htmlTechArticleThis article will introduce you to the program code for getting the checkbox form value in PHP. Friends who need to know more can enter it for reference. , because there is a difference between checkbox attributes and input, so here is a special introduction...
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!