开发者

Prevent write to SQL until admin approval

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!!!!


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜