Need Help To Use Else Function
Posted: Mon Feb 21, 2011 8:06 am
Hello,
Need some help with the below code. Currently the below code will send two emails, and that is working fine,
I need to be able to option the second email to be sent when the below code is tru,
I am just not sure how to implement it to correctly option out the second email. I know I need to use the } else { function, but just can not seem to figure it out.
Thanks for any help.
JR
Need some help with the below code. Currently the below code will send two emails, and that is working fine,
Code: Select all
$name = $firstname . ' ' . $lastname;
if (ACCOUNT_GENDER == 'true') {
if ($gender == 'm') {
$email_text = sprintf(EMAIL_GREET_MR, $lastname);
} else {
$email_text = sprintf(EMAIL_GREET_MS, $lastname);
}
} else {
$email_text = sprintf(EMAIL_GREET_NONE, $firstname);
}
$email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
$email_text_coupon .= EMAIL_WELCOME . EMAIL_TEXT_COUPON . EMAIL_CONTACT. EMAIL_WARNING;
tep_mail($name, $email_address, EMAIL_SUBJECT_COUPON, $email_text_coupon, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);Code: Select all
if ( ACCOUNT_COMPANY == 'true' && tep_not_null($company_tax_id) ) {Thanks for any help.
JR