Hello,
<form method="post" action="<?=$_SERVER['PHP_SELF']?>" enctype="multipart/form-data">
<table>
<tr>
<td> </td>
<td><input type="checkbox" name="user_group[]" value="1"></td>
</tr>
<tr>
<td> </td>
<td><input type="checkbox" name="user_group[]" value="2"></td>
</tr>
<tr>
<td><input type="submit" class="button" name="toplu_email_mesaji" value=" Gönder " /></td>
<td><input type="reset" class="button" value="Sıfırla" /></td>
</tr>
</table>
</form>
$usergroup = implode(",", $_POST['user_group']);
$groups = $mysqlibag->query("SELECT * FROM users WHERE user_group IN (".$usergroup.")");
while ($row = $groups->fetch_assoc()) {
// Here's the PHPmailer code to send bulk messages to members
}
This code does not work
Where’s the error?
Can you help me