I have a section of code in a php page that I need help with. Basically, what I want to do is to only send an email if a certain value(s) are in a field.
// send the email
$to = $CompUserName;
$from = "kmlohr@comcast.net";
$subject = "confirmation";
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
mail($to, $subject, $message, $headers);
The field that it needs to check is $transaction_subject. It should send the email if the value of that field is one, two or three. The field is in the same program as the sending of the email. This is how it is written in the program:
$order_data['transaction_subject'] = $transaction_subject;
Can someone show me how to do this?