2 Replies Latest reply on May 26, 2006 8:55 AM by drforbin1970

    Approving comments and making them live?

    smontellano
      Any ideas where I can find a tutorial with the following criteria:
      I am creating a form where a member will enter their information and logo. Once they have done this
      I will get an email notification that information has been submitted. The submitted information must be reviewed and be able to be edited or approved before it is allowed to go “live” on my live site. Help please!

        • 1. Re: Approving comments and making them live?
          jdeline Level 1
          When the user enters the information, place it in a database. The database table should have a field called, for example, publish. Set publish to FALSE for the new record.

          Later, you can retrieve each record where publish = FALSE and review the users' input. If you like what you see, click a "OK" button that updates the record, setting publish = TRUE. If not, you can delete it, send a nansy-gram to the user or whatever.
          • 2. Re: Approving comments and making them live?
            drforbin1970 Level 1
            If you are going to be dealing with a large amount of submissions, DO NOT insert 'to be approved' submissions into the same table with 'live' submissions. If you do, when you run your queries, you have to run against submissions that are 'not approved' and code for their existence, which can slow down your processing.

            Create another table, ex. pending_approval, to hold new submissions waiting for approval, including a column called 'approved' to pending_approval. Set default value of column 'approved' to -1.

            Review records in pending_approval, update column 'approved' either 0 or 1, 0 = not approved, 1 = approved. Run another query to insert approved=1 records from pending_approval into your 'live' table. Check approved records have inserted successfully, then delete records (using same query or separate query) from pending_approval where approved > -1.