I'm trying to notify (certain members) of my site, when I upload new pictures. The php code will send out the email but, only to one person. I'm trying to send it to everyone with the set_note "2" if that makes any sense. I'm still learning and any help would be greatly appreciated....
Code:<? include_once "accesscontrol.php"; $notify = 2; $q11 = "select * from members_info where set_note = \"$notify\" "; $r11 = mysql_query($q11) or die(mysql_error()); $a11 = mysql_fetch_array($r11); if( !empty( $a11 ) ) { $to = $a11[members_email]; $subject = "New Pictures Posted"; $message = "Dear $a11[fname],\n\nWe posted some new baby pictures on our website. Please login to www.$_SERVER[HTTP_HOST] to view the album.\n\nIf you want to stop getting these automatic notices, please login and change your profile settings.\n\nThanks\nJustin"; $from = "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>"; mail($to, $subject, $message, $from); } ?> <table align="center" width="600" cellpadding="0" cellspacing="0"> <tr><td align="center"><br /><br /><b>Notified Participating Members!</b></td></tr> </table> <? include("../footer.php"); ?>



Reply With Quote

Bookmarks