我有一个正在使用的联系表,我只收到两个通知:
注意:未定义变量:email_content 注意:未定义变量:标头
这是代码
// check if an error was found - if there was, send the user back to the form
if (isset($error)) {
$_POST['e'] = $error;
} else {
// write the email content <-- HERE IS WHERE THE ERROR OCCURS
$email_content .= "Naam:" . htmlspecialchars($name, ENT_QUOTES) . "\n\n";
$email_content .= "Tel:" . htmlspecialchars($tel, ENT_QUOTES) . "\n\n";
$email_content .= "E-mail:" . htmlspecialchars($email_address, ENT_QUOTES) . "\n\n";
$email_content .= "Onderwerp:" . htmlspecialchars($onderwerp, ENT_QUOTES) . "\n\n";
$email_content .= "Bericht:" . htmlspecialchars($message, ENT_QUOTES) . "\n\n";
/*
$email_content .= "Naam:$name\n\n";
$email_content .= "Tel:$tel\n\n";
$email_content .= "E-mail:$email_address\n\n";
$email_content .= "Onderwerp:$onderwerp\n\n";
$email_content .= "Bericht:$message\n\n";
*/
$header .= 'From: www.UTI.nl'; <-- AND HERE IS ALSO WHERE THE ERROR OCCURS
// send the email
mail ("robin2609@gmail.com", "Nieuw bericht van de UTI website", $email_content, $header ); <-- this is
// send the user back to the form
$_POST['s'] = 'Bedankt voor uw bericht.';
我错过了什么?我希望你们能帮助我。
亲切的问候,
罗宾