PHP gets the values ​​of multiple input elements with the same name in the form_PHP tutorial

WBOY
Release: 2016-07-13 10:35:33
Original
830 people have browsed it

Sometimes the front page needs to allow dynamic addition/deletion of multiple values ​​​​of a certain attribute, such as adding books to a bookshelf, and needs to be able to dynamically add or delete books.

There will be multiple input elements in the form on the front page, as follows:

Copy code The code is as follows:






< ;/form>

When the a.php page receives the form data, you can use $books = $_REQUEST['books']; to get an array of all book titles.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/743924.htmlTechArticleSometimes the front page needs to allow dynamic addition/deletion of multiple values ​​​​of a certain attribute, such as adding books to a bookshelf. Books can be added or deleted dynamically. There will be multiple forms in the front page...
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