August 25, 2012

How to send Multiple Emails in PHP


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

The Future of Technology: Emerging Trends to Watch in 2025

Introduction As we navigate through 2025, the technological landscape continues to evolve at an unprecedented pace. Innovations that once se...