[snip]
if ($action == 'send') {

$fimail[] = explode(",", $list);
$count = count($fimail[]);
$show = "<b>Users that have been mailed:</b><br>";
$i = 1;
while ($count > $i) {

                mail($fimail[], "Subject", $message, $headers);
                $show .= "<br>$fimail";
                $i++;
        }

} else if ($action == '') {

$show = "<b>Users to be mailed:</b><br>";

$show .= "
<form method=\"post\" action=\"$PHP_SELF\">
        <textarea name=\"list\" 
style=\"width:300px;height:150px;\"></textarea>
        <input type=\"hidden\" name=\"action\" value=\"send\">
        <input type=\"submit\" value=\"Send Mails &gt;&gt;\">
</form>
";

}
[/snip]

First of all, $i is always going to be greater than 1 .... you have set
up an infinite loop. Then

if ($action == 'send') {

$fimail = explode(",", $list);
$count = count($fimail);
$show = "<b>Users that have been mailed:</b><br>";

for($i = 0; $i < $count; $i++){
        mail($fimail[$i], "Subject", $message, $headers);
      $show .= "<br>$fimail";
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to