I’m trying to make a news letter feature that sends a message to all emails in a specific table.
I have the table ‘rss’ filled with email addresses. I want to store the emails in an array and then use the mail function to send the message to all the addresses that are in the array. (is it possible?)
I think mainly the query is wrong here… any help is appreciated.
[php]
if(empty($_POST[‘message’]) === true || empty($_POST[‘subject’])=== true) {
$errors[] = ‘Both fields are required.’;
} else {
$subject = $_POST[‘subject’];
$message = $_POST[‘message’];
$emails = array();
$emails = mysql_query("SELECT * FROM rss
WHERE email
");
mail($emails, $subject, $message, ‘From: me’);
}
[/php]