Hi All,
I need some help with a form I'm using to allow users of my website to email multiple people.
I have a "poker club" website where people can use to track the stats of people who attend their regular poker games.
I have given the "club owners" the ability to send an email to all of their club members when scheduling a game, or when posting news on the website.
The problem I am finding is that sometimes not all of the members in the club receive the email message.
Is there something wrong with my code??? If so, I'm hoping someone can suggest a better way of doing this.
Here is my code:
$fromemail = "$owneremail";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: <$fromemail>\r\n";
$email_details_format = stripslashes($tournament_details_format);
$body .= "<font face=\"verdana\" size=\"2\">";
$body .= "$email_details_format";
$body .= "<BR><BR>";
$body .= "$ownername<BR>";
$body .= "<a href=\"$homepage/clubhome.php?clubid=$clubid\">$clubname</a><BR><BR>";
$body .= "</font>";
$body .= "<HR align=left width=90%>";
$body .= "<font face=\"verdana\" size=\"1\">Start your own poker club at <a href=\"$homepage\">[url]www.homepokerclub.net[/url]</a>!</font>";
$email_subject = "$clubname - Tournament Scheduled - $tourneydate";
$result_memberemails = mysql_query("select p.email from players p, membership m where p.PlayerID = m.PlayerID and m.ClubID = $clubid");
while ($member_emails = mysql_fetch_row($result_memberemails)) {
$to = "$member_emails[0]";
mail($to, $email_subject, $body, $headers);
}