表格注册突然停止工作

时间:2018-02-17 00:17:28

标签: php html

巨大的广告系列电子邮件突然停止工作,并不完全确定问题在这里。它转到服务不可用的页面?

几天前它正在运作。

<?php
if(!isset($_POST['submit']))
{
    //This page should not be accessed directly. Need to submit the form.
    echo "error; you need to submit the form!";
}
$name = $_POST['cd_FULLNAME'];
$visitor_email = $_POST['Email'];
$dropdown = $_POST['dropdown'];
$message = $_POST['cd_CONTACTPHONENUM'];


$email_from = 'websmail@wscu.com';//<== update the email addresss
$email_subject = "RRSP Campaign Phone Call Request";
$email_body = "The following information was submitted via our external landing page wscu.com/savings. The prospective customer has been informed that they will be contacted by a representative within 1 business day regarding our RRSP Campaign. \n Their name is: $name.\n".

$to = "wscumemberservicecentre@wscu.com, ecommerce@wscu.com";//<== update the email address
$headers = "From: $email_from \r\n";
$headers .= "Reply-To: $visitor_email \r\n";
//Send the email!
mail($to,$email_subject,$email_body,$headers);
//done. redirect to thank-you page.
header('Location: thankyou.html');


// Function to validate against any email injection attempts
function IsInjected($str)
{
  $injections = array('(\n+)',
              '(\r+)',
              '(\t+)',
              '(%0A+)',
              '(%0D+)',
              '(%08+)',
              '(%09+)'
              );
  $inject = join('|', $injections);
  $inject = "/$inject/i";
  if(preg_match($inject,$str))
    {
    return true;
  }
  else
    {
    return false;
  }
}
?> 

HTML:

<form name="lowerForm" id="lowerForm" action="form-to-email.php" method="post" onsubmit="return validate_lowerForm(this)" autocomplete="on">

0 个答案:

没有答案