Home > Backend Development > PHP Tutorial > Demo code for php to read checkbox array value

Demo code for php to read checkbox array value

WBOY
Release: 2016-07-25 08:58:11
Original
995 people have browsed it
  1. Headline[h]
  2. Recommended[c]
  3. Slideshow [f]
  4. Specially recommended [a]
  5. Scroll[s]
  6. Bold[b]
  7. picture[p]
Copy code

Note: The name attribute of the input above has the same content, and they are all 'flags[]'. The reason for adding '[]' is to transfer the content of flags into an array.

2, CheckAction.php file:

<?php
//读取输出
echo implode(",",$_POST['flags']);
?>
Copy after login


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