// Show the members that are in the Database
$query = "SELECT user_id, membership_id, user_email, first_name, last_name, approved FROM vintage_user ORDER BY user_id ";
$result = mysql_query( $query, $mysql )
or die( mysql_error() );
if (mysql_num_rows($result) > 0){
$members = "<ul class='theApprovalList'>";
while($ev = mysql_fetch_array($result)){
$row_id = $ev['user_id'];
$first_name = $ev["first_name"];
$last_name = $ev["last_name"];
$email_member = $ev["user_email"];
$membership_id = $ev["membership_id"];
$members .= "<li><p>Members Name: ".$first_name." ".$last_name."</p></br> <p>Member's Email: ".$email_member."</p></br><p>Membership ID: ".$membership_id."</p></li>";
$members .= "<li><form action=".$myPage." method=\"post\"><input class=\"event_item_box\" id=".$row_id." type=\"checkbox\" name=members_cbox[] value=".$row_id."></li><p class=\"event_item_border\"><p/>";
if (sizeof($_POST['members_cbox'])) {
foreach($_POST['members_cbox'] AS $row_id ) {
$email_query_member = "SELECT user_email FROM `vintage_user` WHERE user_id='" .$row_id. "'";
$the_result_member = mysql_query( $email_query_member, $mysql )
or die( mysql_error() );
if (mysql_num_rows($the_result_member)){
$email_list_member = "";
while($ev5 = mysql_fetch_array($the_result_member)){
$user_emails_member = $ev5["user_email"];
$email_list_member .= "".$user_emails_member.",";
}
mysql_free_result($the_result_member);
}
$to2 = $email_list_member;
$from = "";
$subject2 ="";
$headers = "From: {$from}" . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
mail($to2, $from, $subject2, $headers);
mysql_query("DELETE FROM `vintage_user` WHERE user_id='" .$row_id. "'");
これが現在使用しているものであり、リストに含まれるユーザーの数に基づいて大量の電子メールを送信しますが、削除されるユーザーにのみ送信されます。これは非常に奇妙なバグです。制限を使用するか、実際にターゲットとするユーザーの数を取得する必要がありますか?前もって感謝します。