I am trying to setup email notifications for a webform:
$query = "UPDATE email_tbl SET notified='".mysqli_real_escape_string($conn,$notified)."', reasoning='".mysqli_real_escape_string($conn,$reasoning)."' WHERE id='$id'";
$result=mysqli_query($conn, $query);
$query2 = "SELECT `or_user` FROM `usf_tbl` WHERE `id` = $id";
$result = mysqli_query($conn,$query2);
while ($row= mysqli_fetch_assoc($result))
$to = "example@email.com, $row[or_user]";
$subject = "Email Notification";
$message = "
<html>
<p>Email Notification for $row[or_user]</p>
</html>";
I am receiving the email as required, but the email doesn't contain the "or_user". However, the email is sent to the "or_user" as desired. Why won't it print the "or_user" in the actually email? Thanks in advance.
Email Notification for ".$row["or_user"]."
"; – lazyCoder Apr 27 '17 at 11:31