$id = $_POST[‘id’];

global $wpdb;
$query = $wpdb->query(“SELECT * FROM `j_anon` WHERE id=’$id'”);
$error2 = ($wpdb->num_rows!= 1);
if($error2) {
echo “Invalid ID offered.”;
else {
$email_from = “”;
$email_to = $wpdb->get_var(“SELECT email FROM `j_anon` WHERE id=’$id'”,0,0);
$email_subject = “Response to Anonymous Message – Churchill MCR”;
$message = “Here is the response to your recent anonymous message to the MCR Website, note that at no point did the sender of this message find out your identity or your email address \n \n \n ” . $_POST[‘message’] . “\n \n \n To respond to this, create a new anonymous message at the following address: \n”;
$headers = ‘From: ‘.$email_from.”\r\n” .
‘Reply-To: ‘.$email_from.”\r\n” .
‘X-Mailer: PHP/’ . phpversion();
@mail($email_to, $email_subject, $message, $headers);
echo “Your response was successfully sent.”;