警告:此页面上的表单有1000多个字段PHP MySql [英] Warning: a form on this page has more than 1000 fields PHP MySql

查看:98
本文介绍了警告:此页面上的表单有1000多个字段PHP MySql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个周末发布的问卷.在达到许多条目后,PhpMyAdmin开始显示此警告:

I've got a questionnaire that went live over the weekend. After reaching so many entries PhpMyAdmin started showing this warning:

警告:此页面上的表单有1000多个字段.在 提交时,由于PHP的原因,某些字段可能会被忽略 max_input_vars配置.

Warning: a form on this page has more than 1000 fields. On submission, some of the fields might be ignored, due to PHP's max_input_vars configuration.

该表称为survey,它具有10列和300行数据-大多数为strings.我不知道从哪里获取数字1000字段?一切都很好,直到survey表达到约150个条目.我担心会丢失数据.

The table is called survey and it has 10 columns and 300 rows of data - mostly strings. I don't get where its getting the number 1000 fields from? Everything was fine until the survey table got to about 150 entries. I'm worried I will lose my data.

我的调查问卷共20页,均包含多项选择题.所有值都存储在$_SESSION数组中,然后发送到第21页上的数据库.

My questionnaire comprises of 20 pages all with multiple choice questions. All values are stored in the $_SESSION array then sent to the DB on the 21st page.

推荐答案

您不会丢失数据.此错误消息是特定于您尝试查看表内容并一次选择太多行的.表中的列数乘以显示的行数应低于在php.ini中为max_input_vars设置的值.默认情况下,该值设置为1000.

You aren't going to lose data. This error message is specific to you trying to see the contents of the table and selecting too many rows at once. The number of columns in the table multiplied by the number of rows displayed should be below the value set for max_input_vars in your php.ini. By default this is set to 1000.

使用特定的代码时,除非尝试执行相同的操作,否则不应遇到此错误-一次在一个返回的查询中显示1,000个以上的元素".您真的希望这样做吗?如果是这样,请明智地分页数据并在SQL查询中使用LIMIT.

When you are working with your specific code, you shouldn't encounter this error UNLESS you try to do the same thing--display more than 1,000 "elements" from a returned query at one point in time. Do you really expect to do that? If so, then be smart about paginating your data and using LIMIT in your SQL query.

数据本身是安全的.唯一受影响的是PHP的检索和输出能力.

The data itself is safe. The only thing affected is PHP's ability to retrieve and output.

这篇关于警告:此页面上的表单有1000多个字段PHP MySql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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