thanks for your help guys. it is working for the most part. the email goes out but i cannot get the proper data to display in the sent email. here is the code again:
$newartist = mysql_query("SELECT Distinct mn1.City, mn1.Genre_Select, mn1.Artist_Name, mn1.State_or_Province, mn1.Country, mn1.Genre_Enter, mn1.Artist_Function, mn1.Homepage, mn2.Contact FROM Musicians_Network mn1 LEFT JOIN Musicians_Network mn2 ON (mn1.City = mn2.City or mn1.Genre_Select = mn2.Genre_Select) AND mn2.Updates = 'Yes' WHERE mn1.Date_Created > DATE_SUB( CURDATE(), INTERVAL 7 DAY )", $db);
while(
$myfirstrow = mysql_fetch_array($newartist))
{
$update_email = $update_email.",".$myfirstrow["Contact"];
printf("<tr><td><div align =center>%s</div></td></tr>\n", $myfirstrow["City"]);
printf("<tr><td><div align =center>%s</div></td></tr>\n", $myfirstrow["Genre_Select"]);
printf("<tr><td><div align =center>%s</div></td></tr>\n", $myfirstrow["Contact"]);
}
$update_recipient = $update_email;
$update_subject = "A new artist in your city or genre has been added";
$update_message = "Artist Name: $Artist_Name
Location: $City, $State_or_Province, $Country
Genre: $Genre_Select, $Genre_Enter
Function: $Artist_Function
Homepage: $Homepage";
$update_extra = "From: Boggle_Productions<>\r\nReply-To: ()\r\n";
mail ($update_recipient, $update_subject, $update_message, $update_extra);
In the part above, in the Update Message, i can't get the Artist_Name, $City, etc. to display in the messge. how should i display these ids? using $myfirstrow["Artist_Name"] in place of $Artist_Name doesnt work either. thanks.