我的contact.php 表单有问题。它似乎间歇性地工作,无法发现我做错了什么。
托管在 GoDaddy,他们说要添加以下内容,但不确定在哪里 relay-hosting.secureserver.net
任何有关构建其中之一的帮助或参考都将非常有帮助。当前代码如下。
<?php
if(isset($_POST['email'])) {
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "info@resonatebusiness.com";
$email_subject = "NEW WEBSITE INQUIRY";
$email_message = "Form details below.\n\n";
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$email_message .= "First Name: ".clean_string($full_name)."\n";
$email_message .= "Last Name: ".clean_string($email)."\n";
$email_message .= "Email: ".clean_string($email)."\n";
$email_message .= "Telephone: ".clean_string($subject)."\n";
$email_message .= "Comments: ".clean_string($message)."\n";
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
header("Location: http://www.publishingpush.com");
exit;
?>