如何在PHP中限制隐藏字段值 [英] How to restrict hidden field values in PHP

查看:82
本文介绍了如何在PHP中限制隐藏字段值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我的表格包含输入类型文字和隐藏的字段。



i需要获取除php中隐藏的类型之外的所有输入类型数据。



我尝试过:



获取所有输入类型数据,其中我需要除隐藏字段数据之外的所有数据。

hello,

I have form with fields like input type text and hidden.

i need to get all input type data except type hidden in php.

What I have tried:

getting all input type data, where i need all data except hidden field data.

推荐答案

嗯,你有两个简单的选择:

1)不要给隐藏的字段赋予name =''属性,也不会将其发送到服务器。

2)如果需要,给他们一个名字 - 你可以在服务器上忽略它。




Well, you have two easy options:
1) Don't give the hidden fields a name='' attribute and it won't be sent to the server.
2) Give them a name if you need to - you can ignore it at the server.



是的,它适用于我。我从表单中删除name属性..谢谢你
yes,its works for me. i remove the name attribute from the form..thank u


这篇关于如何在PHP中限制隐藏字段值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆