I need something like this to work and send email. Period.
I need to select * from users where dealer='x';
Then I need to get those emails from those users and email them all.
Keeps saying fatal call to something undefined prepare or something.
$query = "SELECT email FROM users WHERE dealer='x'";
$statement = $dbConnection->prepare($query);
if ($statement->rowCount() > 0)
$result = $statement->fetchAll(PDO::FETCH_OBJ);
foreach ($result as $row)
if (strpos($email, $row->email) === false)
$email .= $row->email . ", ";
// send email
$senderName = "Your name";
$subject = "Your subject message";
$comment = $message; // the email message that you want to send
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
mail($email, $subject, $comment, $headers);
30 freelancere byder i gennemsnit $23 på dette job
I have good knowledge of PHP. I able to do this task very well with good quality. Our main motto is client satisfaction and makes a long-term relationship with you. Thank you
Hi, Hope you doing well.I read your PHP/MYSQL project description and very confident to handle this project perfectly Let's have a discussion, negotiate costing, timeline and then we proceed Thanks!