This is my first try at php. The form works when I have just one recipient. But I don't quite have the code right for having multiple recipients selected by using checkboxes. And help would be hugely appreciated. Below is the code for formpage.php, and mail.php. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Form</title> </head> <body> <form action="mail.php" method="post"> Your Name:<br> <input type="text" name="name"><br><br> E-mail:<br> <input type="text" name = "email"><br><br> Comments<br> <textarea name="comments"></textarea><br><br> <input type="checkbox" name="incoming_mailto[]" value="gmail">Send form to gmail address</input><br> <input type="checkbox" name="incoming_mailto[]" value="yahoo">Send form to yahoo address</input><br> <br><br> <input type="submit" value="Submit"> </form> </body> </html> <? function checkOK($field) { if (eregi("\r",$field) || eregi("\n",$field)){ die("Invalid Input!"); } } // make array of all possible mails that could be used - a security check $permittedmailsarray = Array( 'gmail' => 'skharrisla@gmail.com', 'yahoo'=> 'webtechla@yahoo.com' ); if(is_array($_POST['incoming_mailto'])) { foreach($_POST['incoming_mailto'] as $v){ $recipients = $permittedmailsarray[$v]; } } $name=$_POST['name']; checkOK($name); $email=$_POST['email']; checkOK($email); $comments=$_POST['comments']; checkOK($comments); $to="skh@webtechla.com"; $message="$name just filled in your comments form. They said:\n$comments\n\nTheir e-mail address was: $email"; if(mail($to,"Comments From Your Site",$message,"From: $email\n")) { echo "Thanks for your feedback."; } else { echo "There was a problem sending the mail. Please check that you filled in the form correctly."; } ?>