JohnMac328
asked on
PHP error check before trying to send emails
Dealing with a live site and don't want to blow up the page - will this cause any problems anyone can see
// Send emails to individuals
if (isset($_POST['id-01'])) {
$to = 'email@somewhere.com';
}
elseif (isset($_POST['id-02'])) {
$to = 'email@somewhere.com';
}
elseif (isset($_POST['id-03'])) {
$to = 'email@somewhere.com';
}
elseif (isset($_POST['id-04'])) {
$to = 'email@somewhere.com';
$send_data = array(
'to' => $contact_form['Mail_To'] ? $contact_form['Mail_To'] : $this->default_contact_email,
'from' => $contact_form['Mail_From'] ? $contact_form['Mail_From'] : $this->default_email_from_address,
'subject' => "{$contact_form['Subject']} from $this->End_User_URL",
'body' => $contact_form['Body']
);
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER