Upadting data and then sned mail if certain field equal to c

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
seandisanti
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: Upadting data and then sned mail if certain field equal

Post by seandisanti » Tue Oct 02, 2012 8:09 am

My requiremnet is, if $smpl_typ=pps and $smpl_cmnts=Approved then it will send auto mail to the user.
Kindly advise any suggestion or any example to achive my requirement.
something like...

Code: Select all

 if ($smpl_typ='pps' && $smpl_cmnts='Approved') { 
// The message
$message = "Line 1\nLine 2\nLine 3";

// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);

// Send
mail('caffeinated@example.com', 'My Subject', $message);
}
that's just the conditions you've already stated and the first example from php.net for mail()

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest