Forum Moderators: coopster
add it at the end of your DB update/insert script
and also verify that the form cannot be sent twice.
<?
// ### email to user
$conn = db_connect(); // your DB conn function
$sql= "select contact_email from TABLE where id=$new_content";
// I suppose that you grab the user's email and feed your DB with.
$result = mysql_query($sql,$conn);
while ($new_content=mysql_fetch_array($result) )
{
$contact_email= $new_content[contact_email]; //echo "$contact_email";
}
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers = 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$email=$_POST['email'];
$to=$email;
$subject="New member";
$message="Dear Site Administrator <br> New member aaaaaaaaaaaaaaaaaaa ";
if (@mail($to, $subject, $message, $headers)) {
echo('<h3><b>Whatever.......</h3>');
} else
{
echo('<p>Hmmm! Slight email problem...</p>');
}
// ## end of email
?>