On Thu,  5 Apr 2001 16:27, you wrote:
> Hi!
>
> Do u mean the code should be like this?
>
>
> $connect = mysql_connect();
> $query = "select email from table";
> $execute = mysql_db_query("database", $query);
> while($r=mysql_fetch_array($execute))
> {
> $try = $r('email');

Your syntax is wrong here - see the example in the docs for 
mysql_fetch_array

> $email .= $try . ";";

and multiple addresses are separated by comma

> }
>
> mail("$email", "My Subject", "Line 1\nLine 2\nLine
> 3");
>

It might be wise to just echo what you are proposing to pass to mail() 
until you get it right.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to