php - Approving information prior to storing in database? -


i developing web-based iphone app , possibly pc friendly website version well. goal here to allow users submit form specific input values stored table in database.

mind information being gathered public display , posted onto calendar or list.

however, prevent trolling or spamming, i'd make submissions have approved prior being submitted table.

i have no problem creating table, connecting database, storing input values corresponding table columns. issue how go setting approval system? can add information table via email? there way approve admissions in cpanel?

this make smooth possible, expecting lot of submissions daily quite bit of information.

thank you

you can have 2 approaches this.

approach 1

  • have 2 copies of table (which want save information into). first 1 should named tablename_input. second 1 should tablename_final.

  • any data in '_input' considered raw , needs approval. once approved data moved '_final'. live list/calendar read '_final' data.

approach 2

  • have column named 'isapproved' flag 0/1. if 1 approved, else not. show data approved.

now, how data approved ?

  • you have hard fast rule spam filter tells post valid , approved default
  • after every post, send user email or notification (unique user - post) when answered back, shall mark approved.

optional: can place column called 'approval comments' fill in @ time of approval.

flow chart

tables

  • 'firstsubmitcontent' - table store user submitted information prior approval.
  • 'finalsubmitcontent' - table stores final information

code pages

  • content page --> contains form user fills content
  • contentactionpage --> calls controller --> calls model
  • controller --> calls model based on page action
  • model --> interacts database table

flow chart various steps in process

i not have tools @ disposable write more detailed code or flowchart. hope puts in right direction.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -