如何防止balnk条目进入数据库? [英] How to prevent balnk entries to database?

查看:62
本文介绍了如何防止balnk条目进入数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在wordpress中使用HTML表单,通过它我们可以将数据保存到数据库。我不知道什么是错误的代码,每当我提交或刷新我的页面时,添加到表格中的数据会自动空白或重复任何人告诉我如何防止这种情况? 我的代码在这里

I am using an HTML form in wordpress by which we can save the data to database. i dont know whats wrong with that code whenever i submit or refresh my page the data added to the table automatically blank or duplicate anyone tell me how to prevent from this? My code is here

推荐答案

亲爱的ibnewaris



根据我的关注,您可以编辑数据库并将列设置为主键并设置允许Null = false



谢谢
Dear ibnewaris

as per my concern you can edit your database and set a column as primary key and set allow Null= false

thanks


这篇关于如何防止balnk条目进入数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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