Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>//Query to get emails //$share_to comes from a drop down selection of users. it could be 1 person or multiple people.The way its stored in the field is this way user1,user2,user3,user4 or if one person then just user1. $sql = "SELECT email_address from accounts WHERE person_id='$share_to'"; $result = mysql_query($sql); $query = mysql_query($sql) or die ("Error: ".mysql_error()); if ($result == "") { echo ""; } echo ""; $rows = mysql_num_rows($result); if($rows == 0) { print(""); } elseif($rows &gt; 0) { $email=''; while($row = mysql_fetch_array($query)) { $email. = htmlspecialchars($row['email_address']).','; print(""); } } $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $headers .= "From: $usermail\r\n"; $headers .= "BCC: ".rtrim($email,",")."\r\n"; $to = "support@domain.com"; //the mail in the "TO", visible to all. there has to be 1. $subject = "$fullname Asked you something"; $message = "&lt;html&gt;&lt;body&gt;"; $message .= "Hi!, &lt;br&gt;&lt;br&gt;$fullname asked you something.&lt;br&gt;&lt;br&gt;"; $message .= "&lt;a href=www.domain.com/login.php&gt;Click here to login.&lt;/a&gt;&lt;br&gt;&lt;br&gt;"; $message .= "Please reply to this email if you have any questions.&lt;br&gt;&lt;br&gt;Thanks, &lt;br&gt;&lt;br&gt;Abe&lt;br&gt;"; $message .= "&lt;img src=www.domain.com/images/logohop.png /&gt;&lt;br&gt;&lt;br&gt;"; $message .= "&lt;/body&gt;&lt;/html&gt;"; mail($to, "Subject: $subject", $message, "$headers" ); echo ""; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload