i have form to get checklist from table checkbox. inside the table, there are list of emails. i want to get that email and bomb it. somekind of marketing email. please help me to solve this php form? php to send to all emails from the checklisted table.
<form name="bomber" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post" enctype="multipart/form-data">
<table width="450px">
<tr>
<td width="50px"> </td>
<td nowrap="nowrap">
<span class="style40 style42">From:</span> </td>
<td>
<input type="text" name="fromname" maxlength="100" size="50"> </td>
</tr>
<tr>
<td width="50px"> </td>
<td nowrap="nowrap">
<span class="style40 style42">From Email:</span> </td>
<td>
<input type="text" name="from" maxlength="100" size="50"> </td>
</tr>
<tr>
<td width="50px"> </td>
<td nowrap="nowrap">
<span class="style40 style42">From Table:</span> </td>
<td>
<?php
include "connect.php";
$query = "SELECT * FROM `group`";
$hasil = mysql_query($query);
$no = 1;
while ($data = mysql_fetch_array($hasil)){
echo "<input type='checkbox' value='".$data['namagroup']."' name='mk".$no."' /> ".$data['namagroup']."<br />";
$no++;
}
?>
</td>
</tr>
<input type="hidden" name="jumMK" value="<?php echo $no-1; ?>" />
<tr>
<td width="50px"> </td>
<td nowrap="nowrap">
<span class="style40 style42">Subject:</span> </td>
<td>
<input type="text" name="subject" maxlength="200" size="50"> </td>
</tr>
<tr>
<td width="50px"> </td>
<td nowrap="nowrap">
<span class="style40 style42">Message:</span> </td>
<td>
<textarea name="message" maxlength="1000" cols="38" rows="6"></textarea>
</td>
</tr>
<tr>
<td width="50px"> </td>
<td> </td>
<td>
<input type="submit" name="emailbomber" value="Bomb!" onClick="document.bomber.submit()"> </td>
</tr>
</table>
</form>