include("../connect.php");
if(isset($_REQUEST['Send']))
{
foreach ($_POST['chk_box'] as $id)
{
$qr = mysql_query("SELECT email FROM <Table Name> WHERE id = '".$id."' ");
if (mysql_affected_rows()>0)
{
while ($email = mysql_fetch_array($qr))
{
$email_add = $email['email'];
mail( $email_add , 'Subject','Message Goes Here', "From: <Your Email Address>");
}
}
}
}
No comments:
Post a Comment