Skip to content

Commit

Permalink
feedback and impact updated
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-p committed Nov 10, 2014
1 parent ef89eb0 commit 1d76b44
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
15 changes: 10 additions & 5 deletions designing-for-clinicians/feedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
</div>
<?php
//form data
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$blank = $_POST['blank'];
$name = Trim(stripslashes($_POST['name']));
$email = Trim(stripslashes($_POST['email']));
$message = Trim(stripslashes($_POST['message']));
$blank = Trim(stripslashes($_POST['blank']));
$to = 'feedback@inspiredehrs.org';
//$from = $email;
$from = 'feedback@inspiredehrs.org';
Expand All @@ -74,6 +74,11 @@
$body = "From: " . $name . "\n";
$body .= "Email: " . $email . "\n \n";
$body .= "Message: \n" . $message . "\n";
if(!empty($blank)){
$body .= "This message made it past our meager spam filter: ";
$body .= $blank;

}

$headers = "From:" . $from . "\r\n";
$headers .= "Content-type: text/plain; charset=UTF-8" . "\r\n";
Expand Down Expand Up @@ -104,7 +109,7 @@
echo "<p>Sorry, your message looks like spam, so it was not sent.</p>";
}

if ($formok = true && mail($to, $subject, $body, $headers)) {
if ($formok == true && mail($to, $subject, $body, $headers)) {
echo "<p>Thanks for your email. We'll get back to you ASAP</p>";
} else {
echo "<p>There was an issue, try sending again.</p>";
Expand Down
14 changes: 9 additions & 5 deletions designing-for-clinicians/impact.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@
</div>
<?php
//form data
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$blank = $_POST['blank'];
$name = Trim(stripslashes($_POST['name']));
$email = Trim(stripslashes($_POST['email']));
$message = Trim(stripslashes($_POST['message']));
$blank = Trim(stripslashes($_POST['blank']));
$to = 'impact@inspiredehrs.org';
//$from = $email;
$from = 'impact@inspiredehrs.org';
Expand All @@ -91,6 +91,10 @@
$body = "From: " . $name . "\n";
$body .= "Email: " . $email . "\n \n";
$body .= "Message: \n" . $message . "\n";
if(!empty($blank)){
$body .= "This message made it past our meager spam filter: ";
$body .= $blank;
}

$headers = "From:" . $from . "\r\n";
$headers .= "Content-type: text/plain; charset=UTF-8" . "\r\n";
Expand Down Expand Up @@ -121,7 +125,7 @@
echo "<p>Sorry, your message looks like spam, so it was not sent.</p>";
}

if ($formok = true && mail($to, $subject, $body, $headers)) {
if ($formok == true && mail($to, $subject, $body, $headers)) {
echo "<p>Thanks for your email. We'll get back to you ASAP</p>";
} else {
echo "<p>There was an issue, try sending again.</p>";
Expand Down

0 comments on commit 1d76b44

Please sign in to comment.