こんにちは、私には少し混乱しているので、質問してください..
- ポップアップボックスにお問い合わせフォームを設置しました!Google Chrome では問題なく動作しますが、Firefox では影が表示されるだけで、ポップアップは表示されません
lightbox
。 google captcha
検証に使用する電子メール スクリプトをセットアップしました (re-captcha
) が、フォームに入力して [送信] をクリックしてもエラーが発生せず、送信されません。
しかし、受信トレイにメールが届かない..Gmail、Hotmail、その他いくつか試してみた..
だから私は問題がどこにあるのか理解できません.誰かが私のコードをチェックして、それが私のコアエラーかサーバーエラーか、そしてこれらの問題を修正する方法を教えてください.
ここに私のsendmail.phpコードがあります:
<!-- for re-captche -->
<?php
require_once('../recaptchalib.php');
$privatekey = "xxx-xxxxxxxxxxx";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
} else {
if(!$_POST) exit;
$to = "###";
$email = $_POST['email'];
$name = $_POST['name'];
$message = $_POST['message'];
$subject = "You've been contacted by $name";
$content = "$name sent you a message from your enquiry form:\r\n\n";
$content .= "Contact Reason: $message \n\nEmail: $email \n\n";
if(@mail($to, $subject, $content, "From: $email \r\n Reply-To: $email \r\nReturn-Path: $email\r\n")) {
echo "<h5 class='success'>Message Sent</h5>";
echo "<br/><p class='success'>Thank you <strong>$name</strong>, your message has been submitted and someone will contact you shortly.</p>";
}else{
echo "<h2 class='failure'>Sorry, Try again Later.</h2>";
}
}
?>
<!-- For contact us form validation and sending -->