I have a web form that, based on the subject selected (form field name: subject), the PHP procssing page will direct the form contents to a specific email address. Below is a snippet of the php code. However, what is happening is regardless of the subject selected on the forms page, the email is going to the email1 address. The emails going to the email1@address.com have the correct subject title in the subject field of the email, along with the correct content of the completed form. Thus I'm relatively sure the $subject variable w/in the php processing page is getting the information passed correctly.
Anything obvious jump off the page here? If more code is required, please advise.
<?php
$subject = $_REQUEST['subject'];
if ($subject == 'general' or 'summer programs')
{
$recipient = "email1@address.com";
}
elseif ($subject == 'schedule games' or 'baseball 101' or 'counselor' or 'counselor prospect')
{
$recipient = "email2@address.com";
}
else
{
$recipient = "email3@adress.com";
}
(more code blah blah)
mail($recipient, $subject, $msgPBS, "From: $name <$email>");
?>
Thanks; Les