I have a form with multiple checkboxes on it. Each check box has multiple emails. What i want to do is if they check the checkboxs then it needs to send out a email to the selected persons. Below is what is in the database.
ID,S,E
1,a,
2,a,
3,a,
4,b,
5,b,
So if they select a then it will send one email to all that is a If they select a,b then it will send 2 emails one for a and one for b
Here is the code for the checkboxs
[code=php]<form id=”form1″ name=”form1″ method=”get” action=”SendBWMEmail.php”>
<table border = “1” cellpadding = “5”>
<tr>
<?php
while ($row = mysql_fetch_row($getSwitch))
{
if (($cats / 15) == 1)
{
echo “<td align = ‘center’>$row[0]:<input type=’checkbox’ name=Switch value=$row[0] /> <br /></td></tr><tr>”;
$cats = 1;
}
else
{
echo “<td align = ‘center’>$row[0]:<input type=’checkbox’ name=Switch value=$row[0] /> <br /><br /></td>”;
$cats++;
}
}
?>
</tr></table>