Hi All. Can someone please help me? All I want to do is loop through selected checkboxes and, based on what is checked, fire off emails to the appropriate person.
I am pretty slow at understanding arrays. I thought I could do something like:
FORM
<input type="checkbox" name=special[] value="4A Spanish">4A Spanish
<input type="checkbox" name=special[] value="4B Spanish">4B Spanish
etc.
PHP
foreach($_POST["special"] as $value) {
if (in_array("4A Spanish", $special)) {
$send="nameone@yahoo.com";
}
if (in_array("4B Spanish", $special)) {
$send="nametwo@aol.com";
}
}
// EMAIL CORRECT PERSON
mail( "$send",
"Signup",
$message = "Specialist Class(es):",
"From: $email" );
Sorry if this is a lame post, I just can get my mind around this one.
🙁