i'm open to suggestions, thank you for reading this!
Code: Select all
$var8_getALLemails = "-1";
if (isset($_GET['comment_title'])) {
$var8_getALLemails = $_GET['comment_title'];
}
mysql_select_db($database_connUser, $connUser);
$query_getALLemails = sprintf("SELECT userTable.user_id, userTable.username, userTable.email, testComment.user_id, testComment.comment_id, testComment.comment_title FROM userTable INNER JOIN testComment ON userTable.user_id = testComment.user_id OR userTable.user_id = testComment.comment_id WHERE testComment.comment_title = %s GROUP BY userTable.email", GetSQLValueString($var8_getALLemails, "text"));
$getALLemails = mysql_query($query_getALLemails, $connUser) or die(mysql_error());
$row_getALLemails = mysql_fetch_assoc($getALLemails);
$totalRows_getALLemails = mysql_num_rows($getALLemails);
do {
$username = $row_getALLemails['username'];
$email = $row_getALLemails['email'];
$comment = $row_getALLemails['comment_title'];
$subject = "New comment";
$message = "Hello, $username!
You have a NEW comment in this conversation:
-- $comment.
Login at http://www.mysite.com.
Thank you,
ME
--This is an automated response, please do not reply--";
mail($email, $subject, $message, 'From: ME');
} while ($row_getALLemails = mysql_fetch_assoc($getALLemails));