This topic is locked
[SOLVED]

 Guestbook.. approve or reject entries before being entered in DB

3/9/2008 11:17:06 AM
PHPRunner General questions
A
amirgulamali author

Hello,
I am creating a simple guest book and would like to have the entries sent to my email for approval before entered into the database.. so that I can manage and reject unwanted entries.. any idea as to how this can be achieved using PHPRunner?
Thanks!

J
Jane 3/11/2008

Hi,
you can do the following:

  1. add new field to the table on the Datasource tables tab where status of added record will be stored,
  2. edit SQL query on the Edit SQL query tab.

    Here is a sample:
    select field1,

    field2,

    ...

    fieldN

    from TableName

    where Status='approved'


2. fill Status field with non-approved value on the Before record updated event and send email.
Then admin can change value of Status field and this record will appear on the page.

T
tyguy 8/8/2008

Hi,

you can do the following:

  1. add new field to the table on the Datasource tables tab where status of added record will be stored,
  2. edit SQL query on the Edit SQL query tab.

    Here is a sample:
  3. fill Status field with non-approved value on the Before record updated event and send email.
    I know this post is a bit older... is there a way to do it without going back into PHPRUNNER... I make so many html changes to the templates that recreating the pages can be very frustrating... Can anyone give a step by step guide to making these changes to the code?
    Thank you!
    Then admin can change value of Status field and this record will appear on the page.

T
tyguy 9/1/2008




Bump

J
Jane 9/1/2008

Hi,
use events to modify SQL query (Before SQL query event), fill status field with required value and send email to admin (Before record added event).

To add events edit generated include/..._events.php file.