This topic is locked
[SOLVED]

 e-mail after record updated

3/14/2012 3:24:30 PM
PHPRunner General questions
ncreveld author

I use this script with I found on your PHP forum. It works very good.

What code do I have to add to this script in order that every email will show the index number from record concerned.

The database name = nik

The fieldname = code

Thanks,

Nico Creveld

//** Send email with new data ****

$body = "Changed fields \n";

foreach ($values as $key => $value)

{

if ($value!=$oldvalues[$key])

$body .= $key . ": " . $value . "\n";

}

$email="creveld@017.net.il";

$subject="Code number = "; (I want the code number to be displayed after the subject text)

runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $body));

// Place event code here.

// Use "Add Action" button to add code snippets.

return true;

C
cgphp 3/14/2012
//********** Send email with new data ************

$body = "Changed fields \n";

foreach ($values as $key => $value)

{

if ($value!=$oldvalues[$key])

$body .= $key . ": " . $value . "\n";

}

$email="creveld@017.net.il";

$subject="Code number = ".$values['code']; //(I want the code number to be displayed after the subject text)

runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $body));

return true;