On Mon, 3 Nov 2003 12:29:10 +0900, you wrote:

Without running the code, I can see two immediate problems.

>$subject = "EigoImprov Newsletter for " .member[1];

should be

$subject = "EigoImprov Newsletter for " . $member[1];

Also rewrite

>$mailcontent = "Dear " .$member[0] .",\n".$message ."\nThis message was
>sent to [2]" .$member;

as something closer to

$mailcontent = "Dear {$member[0]},\n$message\nThis message was
sent to {$member[2]}";

There are a couple of other good-practice changes you could make:

List the columns explicitly - that way your code will still work if the
database structure gets changed:

>$query = "select * from tablename where active = 1";

$query = "SELECT col1, col2, col3 FROM tablename WHERE active = 1";

>$result = mysql_query($query);

Check for failure after doing the query.

$result = mysql_query ($query);
if ($result == FALSE)
{
        die ("Query error");
}

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

Reply via email to