Heres a piece of simple form:
<?php
if ($_POST['submit'] && !empty($_POST['msg'])) {
if (!empty($_POST['emailto']))
$email=implode(',',$_POST['emailto']);
else
$email='john.doe@hotmail.com'; //default
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$headers .= "From:postmaster@site.com\n";
$subject = 'Form sent from site.com';
$message = $_POST['msg'];
mail($email,$subject,$message,$headers);
// Redirect to thankyou-page
header('Location: http://www.site.com/thanks.html');
}
?>
<html>
<body>
<form method="post" action="<?=$_SERVER['PHP_SELF']?>">
Message:<br><textarea name="msg"></textarea><br>
John Doe:<input type="checkbox" name="emailto[]" value="john.doe@hotmail.com"><br>
Jane Doe:<input type="checkbox" name="emailto[]" value="jane.doe@hotmail.com"><br>
Jack Doe:<input type="checkbox" name="emailto[]" value="jack.doe@hotmail.com"><br>
<input type="submit" name="submit" value="Submit">
</body>
</html>