Several nurses attend the same patient.
Therefore when something is changed in a dossier an email is send to those nurses.
But sometimes a dossier just need some 'cleaning up' and is an email not nessesary to send.
I made a checkbox that is normaly 'on'. But is an email is not to be send the checkbox is un-checked before saving.
The field name of the checkbox is 'emailbericht'.
AfterEdit
The problem is that eather way the email is send.
Therefore when something is changed in a dossier an email is send to those nurses.
But sometimes a dossier just need some 'cleaning up' and is an email not nessesary to send.
I made a checkbox that is normaly 'on'. But is an email is not to be send the checkbox is un-checked before saving.
The field name of the checkbox is 'emailbericht'.
AfterEdit
// ********** Send conformation email ************ ini_set('SMTP','smtp.email.com'); $html = true; // variables $stuur = $values["emailbericht"]; $from = "me.mail.com"; $subject = "Patient"; $message = 'Bla bla bla'; $message .= 'Bla bla bla' . "<br />" . "<br />"; $message .= 'Administration'; //Headers $headers = 'From: ' . $website_naam . ' <' . $from . '>' . PHP_EOL; $headers .= 'X-Mailer: PHP/' . phpversion() . PHP_EOL; $headers .= 'X-Priority: Normal' . PHP_EOL; $headers .= ($html) ? 'MIME-Version: 1.0' . PHP_EOL : ''; $headers .= ($html) ? 'Content-type: text/html; charset=iso-8859-1' . PHP_EOL : ''; if ($stuur = 1)// Send the message { mail($from, $subject, $message, $headers); } else { echo "Waarde : $stuur"; } header("Location: Particulieren_list.php?a=return"); exit();
The problem is that eather way the email is send.