hi ,
i have a simple form that a "user" can enter their name, email and some comments, then when the form is submitted, it emails an email account(e.g nobody@server.com), with details that the user has submitted
but i wish to adapt the code, so that i can drag, say 50 email address off a MySQL database, and email all the address in one go, with whatever i type in the comments section of the form.
has anybody got any suggestions, how i could achieve this??
this is the code i have so far......
<?php
if($sentemail == "2"){
include("sorry.php");
}else{
$num = $sentmessage + 1;
setcookie("sentemail","$num",time()+600); //set the cookie
$email = "Sender Name:\t$name\nSender E-
Mail:\t$thereemail\nMessage:\t$message\nIP:\t$REMOTE_ADDR\n\n";
$to = "webmaster@someserver";
$subject = "Site Message";
$mailheaders = "From: $thereemail <> \n";
$mailheaders .= "Reply-To: $thereemail\n\n";
mail($to, $subject, $email, $mailheaders);
include("thanksecho.php");
}
?>
thanks
php_2003