为什么var_dump($ _ POST)不显示我所有的变量? [英] Why is var_dump($_POST) not showing all my variables?
本文介绍了为什么var_dump($ _ POST)不显示我所有的变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个连接到HTML输入元素的超过350个名称=somename的表单。当我运行一个var_dump($ _ POST)时,只有150个显示出来了,发生了什么事? 解决方案
确保在html,您正在使用
< input name =name []value =/>
而不是
< input name =namevalue =/>
如果php没有,则会覆盖每个新名称字段的$ _POST ['name']名称属性中的括号。
I have a form with over 350 name="somename" attached to HTML input elements. When I run a var_dump($_POST) only 150 of them show up, what's going on?
解决方案
Make sure that in the html, you are using
<input name="name[]" value=""/>
instead of
<input name="name" value=""/>
php will overwrite $_POST['name'] with each new name field if they don't have the brackets in the name attribute.
这篇关于为什么var_dump($ _ POST)不显示我所有的变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文