Page 1 of 1

Verify Before Insert Script

Posted: Wed Aug 27, 2008 1:23 pm
by zunebuggy
I have a form on my website that currently posts to a pop email account using an ancient formail script. I am new to PHP but here is what I want to do. I want vistors to my website to fill out the form and submit. The results go to a PHP script that sends the results to a page that only I have access to. Each post has its own row on this page with a checkbox next to it. I want to review the posts and if I want them included in my MySQL database, I put the checkmark next to that row. When I am all done, I click a submit button and the posts parse and get inserted into my MySQL database. Can anyone point me to some examples of php scripts like this to get me started? Thank you.

Re: Verify Before Insert Script

Posted: Wed Aug 27, 2008 4:02 pm
by califdon
Well, you need to store the data somewhere so that you can create the "special" page for your review, so it's going to have to go into the database anyway. You can include a field that indicates that it has not yet been reviewed, so you can exclude the unreviewed items from public viewing. Then when you review them, you can check a box that updates the "reviewed" field so they WILL be included. You can decide how you want to treat the ones you don't accept/approve, either leave them in limbo for some period of time, or just delete them when you update the others. That's all straightforward database interaction. So if you need more detailed help on how to do that, a good way to start would be to tell us exactly how you want to do all this and show us your existing email script code (please enclose all code in [syntax=php]...[/syntax] tags for readability).