php with mail!
Posted: Tue Mar 24, 2009 7:04 am
i am trying to get the email addresses from my table in mysql but i cant! can someone help?
if i do it the way it is shown above, it works and i get the email in my inbox but i want to take it from the table because i have many addresses to send to. now i am getting as many emails but sent only to rwahdan@gmail.com because i spacify only one email. how to get the emails from the table?$sql2= "SELECT * FROM tbl_auth_user WHERE subid =5" or die(mysql_error());
$result2 = mysql_query($sql2) or die('Query failed. ' . mysql_error());
if (mysql_num_rows($result) > 0)
{
if ($theday == "Sunday"){
while($row = mysql_fetch_assoc($result))
{
$to = 'rwahdan@gmail.com';
$subject = 'This is the alert report';