php checkbox 复选框

WBOY
Release: 2016-06-23 14:32:42
Original
1794 people have browsed it

在给checkBox命名时,必须要加"[]" ,但是在接收时不能加"[]" 才能得到值!

例如:

html代码





1   
2   
3





 

result.php 代码:

foreach ($_POST['year'] as $item)
{
echo $item."
";
}
?>

Related labels:
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