I have a small problem with php mail() Id like to loop through a database of custoemrs sending emails to each one. I also want to include some information about them in the email (mail merge style) Problem is I cant get eval() to change the variables
while ($customer = mysql_fetch_array($getcustomers)) {
eval ("\$content = \"$content\";");
mail($customer[email], $subject, $content, $mailheaders);
}
$content is from a textfield on a form on the previous page where you write the content of the email eg.
Dear, $customer[firstname]
Your password whioch was $customer[password]
etc.....
Eval only replaces the fileds in the variable the first time for the first customer on the list so in the email you get the same users details repeated and sent out. Any idera on how to fix this? Cheers guys,
Towner