Page 1 of 1

Approving Pending Data

Posted: Tue Aug 10, 2010 5:49 pm
by codeline
I wanted to get some input and recommendations on how to go about with this project I have:

I'm setting up a submission-type form for the public to be able to submit their name/info and an image for a contest. This information should also automatically be able to output for others to see who and what has been submitted so far. However, I want to act as the middle man and have to approve of these posts before they go live.

So my initial idea was to create the table with the obvious rows and a boolean-type row for the submission's status.. maybe call it PEND and give it values of YES or NO with NO being the default value when a user submits.


I wanted to see other's input as well as maybe some advice on a different DB and table design.

Re: Approving Pending Data

Posted: Tue Aug 10, 2010 9:57 pm
by JakeJ
It sounds like you're on the right track. But I think the default of PEND would have to be yes if you wanted to be logical. No would mean not pending. Semantics though. Approved might be more clear.

Make an admin page that is tied to your user name for approvals.

You might want to set up Wordpress for this and modify the commenting system since the code for moderation is already all in place.

Re: Approving Pending Data

Posted: Wed Aug 11, 2010 6:15 am
by codeline
Semantics, of course. Always need to keep it easy to understand so when I return to it in a few months I still know what the heck I was coding.

So if I did decide to continue with a varchar field labeled "approved" and the values YES or NO (NO being the default).. would this be a suitable AND safe option for a situation in which I'm assuming I'll be receiving 300 - 500 submissions from users? The form will require a name, email and other minimal elements.. but would this be a safe route to take?

Re: Approving Pending Data

Posted: Wed Aug 11, 2010 6:21 am
by JakeJ
I see no reason why not since the users would not have the ability to make a post approved.

Also, make sure you normalize your data. Keep user info in one table, submission info in another, etc. And make sure you sanitize your data before allowing it in to the database.

Re: Approving Pending Data

Posted: Wed Aug 11, 2010 11:27 pm
by codeline
Thanks for the help, Jake!