GoLive Gurus,
The problem has been resolved. I now understand much better how
"while" loops operate, and fixed the problem of the script not parsing.
I am now successfully making mailing lists using PHP.
While I was banging my head thinking there was something wrong
with how I was
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 ."\nT
Thank you Lief, Hanuska and Jay for your comments and advice.
> (it automagically knows which result it's on)
This was the piece of information that I was missing. I did not
know PHP had any "automagic" in it's handling of arrays.
However, now that I think I know what's going on,
[snip]
But in the rest of the script I can't find where they declare and fill
this array.
[/snip]
The subscriber array is filled by the query. Since PHP is not a strongly
typed language there is no need to declare the array.
$sql = "SELECT `foo`, `bar` FROM `customers` WHERE `status` = 'active'"
Dave G wrote:
In the example they give in this book, they use a "while" loop
(page 670, for anyone who has it). But it's confusing because it looks
like this:
while ( $subscriber = mysql_fetch_row($result))
{
[write and send the email]
}
$subscriber
5 matches
Mail list logo