Heres my code:
<?
$who = $POST['who'];
$typeOfInfo = $POST['typeOfInfo'];
$nameOfWho = array(
"pinsured" => "Prospective insured",
"pagent" => "Prospective agent",
"insured" => "Insured",
"agent" => "Agent",
"unknown" => "Unknown Person");
$nameOfInfo = array(
"Request Claim Information",
"Request information about my policy",
"Request information about obtaining my policy",
"Request my password",
"Comment on your website",
"Contact you on an unlisted topic");
$list = array(
"lesham@farmersofsalem.com",
"lesham@farmersofsalem.com",
"lesham@farmersofsalem.com"
);
switch ($who) {
case "pinsured" :
$mailing = $list[0];
break;
case "pagent" :
$mailing = $list[0];
break;
case "insured" :
$mailing = $list[0];
break;
case "agent" :
$mailing = $list[0];
break;
case "unknown" :
$mailing = $list[0];
break;
default:
die("You should select who you are");
}
$post = "$name, a ". $nameOfWho[$who].
" wants to ". $nameOfInfo[$typeOfInfo] .
":
Additional comment was:
$comment\n";
mail($mailing,
"An information requested",
$post) or die("Mail session failed! The query was not sent, contact the administrator");
echo "Your email has been sent."
?>
I need it to mail differnet people based off of the 2 decisions. It appears as of now it only emails based off of 1 decision. I need it to have a matrix of some sort but not sure how to do it... ne help at all = appriciated :-)