// 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. "'");
这就是我现在使用的,它根据列表中有多少用户发送大量电子邮件,但只发送给被删除的用户,这是一个非常奇怪的错误。也许我应该使用限制或实际抓住目标用户的数量?提前致谢。