This topic is locked

Email Action for PhpRunner..

5/21/2009 6:42:52 AM
PHPRunner General questions
A
Azeem author

Dear All!
I have a very simple database structure like there are 02 tables:

  1. customers
  2. Payments
    Both are linked with the a field named CustomerID. which is primary in customers and foreign in payments.

    In the administration side there is add payments form. When all the fields are added and the form is to be submitted there should be an email sent to the Customer that is also carbon copied to admin with the new values and the message of "your payment has been received".
    Email address to which the email is sent should be picked from the customers table with the help of the customer ID field and the mail should be sent accordingly.
    There is an email event in the phprunner but it gives you the option of simple phpmail function by manually setting an email address to the variable.
    I hope you have understood the scenarion in detail. I will also like to mention here that I am not a PHP expert just a beginer and have no proper knowlege of smarty at all.
    Please help immediately...

    Best wishes

    Azeem

J
Jane 5/21/2009

Hi,
to select email use following code:

global $conn;

$str = "select EmailFieldName from customers where CustomerID=".$values["CustomerID"];

$rs = db_query($str,$conn);

$data = db_fetch_array($rs);

$email = $data["EmailFieldName"];

A
Azeem author 5/22/2009

Hi,

to select email use following code:


_____

Hello Jane !
Thankssssss a lotttt for your kind help. This solution was perfect. Have no words to thank you...
Thumbs Up for you...
Best Regards,

Azeem