Once the user submits:
Code: Select all
<?php
if(isset($_POST['submit']))
{
$emails = array();
if(isset($_POST['checkbox_1']))
{
array_push($emails, 'email' => 'EMAIL FOR CHECKBOX 1');
}
// then to send them all just create a loop
foreach($emails as $mail)
{
mail($mail[''email'], $subject, $message); //etc.
}
}
?>