如何使用PHP发送表单身份验证?

时间:2012-11-23 20:42:12

标签: php forms authentication

尝试使用此表单时出现问题,因为所有垃圾邮件都会出现。 有谁知道我如何使用同样的表格进行身份验证?

感谢任何可以提供帮助的人!

    <?php

    $para = "martins.ago@gmail.com";
    $assunto = "Orçamento";
    $headers = "MIME-Version: 1.0\n"; 
    $headers .= "Content-type: text/html; charset=iso-8859-1\n"; 
    $headers .= "From:Log Materiais <martins.ago@gmail.com>\r\n";
    $headers .= "Reply-To: ".$_POST['razaosocial_nome']." <".$_POST['email'].">\r\n";
    mail("martins.ago@gmail.com",$assunto,$corpo,$headers); 

    mail($_POST['email'],$assunto,$corpo,$headers); 
    unset($_SESSION['Carrinho']['Produto']);
    unset($_SESSION['Carrinho']);
?>
<script>
alert("Seu pedido de orçamento foi enviado, em 24 horas entraremos em contato, aguarde.");
window.location = '../home/index.php?orcamento=Sucesso';
</script>

1 个答案:

答案 0 :(得分:0)

使用reCaptcha。有关reCaptcha PHP文档,请参阅https://developers.google.com/recaptcha/docs/php

相关问题