任何人都可以指出为什么这个联系表格无法正常工作吗?

时间:2017-09-20 15:58:40

标签: php html

下午好,我最近推出了一个网站,在测试过程中,我发现我的联系表格工作不正常。我收到了电子邮件到我的帐户,但没有提交联系信息或邮件内容。任何人都知道可能出了什么问题?谢谢

我的HTML是:

</div>
                <div class="col-md-8 contact-right">
                    <form action="contact.php" method="post">
                        <input type="text" name="Name" placeholder="Name">
                        <input type="text" class="Email" name="Email" placeholder="Email">
                        <input type="text" class="in-phone" name="Phone" placeholder="Phone">
                        <textarea name="Message" placeholder="Message" ></textarea>
                        <input type="submit" value="Send">
                    </form>
                </div>
                <div class="clearfix"> </div>
            </div>
            <div>
            </div>
        </div>
    </div>
</div>
<!--contact end here-->

和PHP:

<?php $name = $_POST['name'];
$email = $_POST['email'];
$email = $_POST['phone'];
$message = $_POST['message'];
$formcontent="From: $name \n Message: $message";
$recipient = "enquiries@website.com";
$subject = "Contact Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>

0 个答案:

没有答案