在管理员批准之前阻止写入 SQL

发布于 2024-10-03 00:16:04 字数 283 浏览 2 评论 0原文

一定要问一下在我的网站上,我有一个注册表单,提交后,会将数据写入数据库。用户提供的地址用于在谷歌地图上显示他们的信息(城市、州、国家……不是具体位置)。一切都会立即显示在谷歌地图上,但我担心一些不应该出现的东西会出现在那里。

假设有人在表单上提交了一些内容...例如名字“Seymour”姓氏“Butts”。显然,我不想添加显示 Seymour Butts 位置的标记。

无论如何,是否可以提交表单,将其发送给指定的管理员进行批准,并且一旦批准,然后将其写入sql数据库?我认为这是最好的方法...我愿意接受建议!!!!

Gotta question. On my website I have a registration form that, once submitted, writes the data to a database. The address that the user provides is used to display their information on a google maps (city, state, country... not SPECIFIC location). Everything shows up on google maps instantaneously, but I'm worried that something will show up on there that shouldn't.

Say someone submits something on the form... like first_name "Seymour" last_name "Butts". Obviously, I don't want a marker added that shows Seymour Butts' location.

Is there anyway to submit a form, have it sent to a designated admin for approval, and, once approved, THEN have it write to the sql database? I think that'd be the best way to do it... I'm open to suggestions!!!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

北方的巷 2024-10-10 00:16:04

将一个字段添加到您写入的任何表中,以指定该项目是否已被批准。然后,您可以查询表中的空白以查看哪些项目需要批准,并查询已批准的项目以仅显示非 Butts 项目。

Add a field to whatever table you write to that designates whether the item has been approved or not. You can then query the table for blanks to see which items need to be approved, and query for approved items to only show non-Butts items.

寄人书 2024-10-10 00:16:04

您可以将其添加到中间表,例如“WaitingForApproval”表。

然后,您可以编写一个管理工具,列出该表的内容,每个项目旁边都有一个“批准”按钮,这将触发插入到真实表中。

You could add it to an intermediate table, say a "WaitingForApproval" table.

Then you could write an admin tool listing the contents of this table with each item having an "Approve" button next to it, which would trigger the insert into the real table.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文