Aşağıdaki e-posta sorgu 0 olmak "ttemail" adlı bir alan tarafından tetiklenen olması gerekiyordu. Bunu kullanmaya çalıştığınızda, ben alıyorum You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1' at line 1
.
Bu e-posta ttemail = 0, en azından ilk adı için dışarı gönderiyor olduğu görülmektedir.
Herhangi bir fikir neden?
Teşekkür peşin,
John
if($row["ttemail"] == 0){
$mailaddress = $row['email'];
$link1 = "<a href='http://www...com/page.php'>Page Title</a>";
$message1 = "Congratulations, message.
<br>
<br>
More Message
<br>
<br>
Please click the link below to see more.
<br>
<br>
$link1
";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: Website Name <no-reply@website.com>" . "\r\n";
$queryem = mail($mailaddress, "Congratulations, message
$submission.", $message1, $headers);
//$ttquery = sprintf("Update login SET ".$row['ttemail']." = '1' WHERE username = ".$row['username']."");
mysql_query($queryem) or die(mysql_error());
mysql_query($ttquery) or die(mysql_error());
} else {
}