<?php
$admin = 2;
$file = __FILE__;
include ("../inc/inc_connect.php");
include ("../inc/inc_admincheck.php");




$result = mysql_query( "SELECT * FROM $userstable WHERE ynBanIp != 'Yes'" );
$num_rows = mysql_num_rows( $result );
while ( $a_row = mysql_fetch_object( $result ) )
{
    $message = str_replace ( "[NAME]", "$a_row->strName", $message);
    mail("$a_row->strEmail", "$subject", "$message");
    $number++;
}
header("Location: admin_mailout.php?sent=1&subject=$subject&number=$number");
exit;