This topic is locked

Email activation

3/3/2009 3:25:57 PM
PHPRunner General questions
W
wilsonhaze author

Please my client needs a feature whereby approval is sent to the client's email address and then it gets confirmed before it can be added to the database on the website, so spam and incorrect entries can be avoided, please how do you suggest i go about this. Urgent help needed please. Thank you.

J
Jane 3/4/2009

Hi,
you can do the following:

  1. create new field (Status for example) in the table on the Datasource tables tab,
  2. edit SQL query for this table on theEdit SQL query tan and show approved records only:
    select ...

    from TableName

    where Status='approved'


3. set up this field as "not approved" by default and send email to admin with this record in the Add page: Before record added event on the Events tab:

$values["Status"] = "not approved";

//send email here

//use "send simple email" action as a sample