0

有人可以帮我证明这个 PHP 脚本的垃圾邮件吗?另外,当我使用这个脚本时,我会收到两封电子邮件,一封是空的,另一封是结果。

<?php 
    $to = "voodoocastde@gmail.com"; 
    $subject = "Registrierung auf voodooCAST.de";
    $headers = "From: Form Mailer";
    $forward = 0;
    $location = "";

    $date = date ("l, F jS, Y"); 
    $time = date ("h:i A"); 



    $msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n"; 

    if ($_SERVER['REQUEST_METHOD'] == "POST") {
        foreach ($_POST as $key => $value) { 
            $msg .= ucfirst ($key) ." : ". $value . "\n"; 
        }
    }
    else {
        foreach ($_GET as $key => $value) { 
        $msg .= ucfirst ($key) ." : ". $value . "\n"; 
        }
    }

    mail($to, $subject, $msg, $headers); 
    if ($forward == 1) { 
        header ("Location:$location"); 
    } 
    else { 
        header( 'Location: http://www.voodoocast.de/confirm.php' ) ;     
    } 

?>
4

1 回答 1

0

在您的 html 表单中,您可以使用<input type="email"></input>它,它会自我验证

于 2012-07-24T17:13:53.377 回答