PHP 关于表单传递变量的有关问题

WBOY
Release: 2016-06-13 12:26:44
Original
900 people have browsed it

PHP 关于表单传递变量的问题
在循环里







在对方接收 own 变量时 总是接收 own最后的一个值,怎么修改可以变成不同的值
------解决思路----------------------
如果循环的是整个表单,那么点哪个就得到哪个
如果循环的只是 own,那么应写作 ,得到的是全部 own,无法区分
------解决思路----------------------
改成  name='own[]' 这种数组形式,然后在PHP里print_r($_POST['own']);就能看到所有的值。
------解决思路----------------------
如果你的name='own' 是有多个 值,
那么可以name='own[]'
这样传递到服务端就是多个值的数组
接收的话,$_POST['own']; 
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!