gpt4 book ai didi

php 表单不发送

转载 作者:可可西里 更新时间:2023-11-01 01:00:12 24 4
gpt4 key购买 nike

<分区>

当我提交我的表单时,它由于未知原因而死亡。

我的表单代码:

    <form action="mail.php" method="post">
<input class="invoeren" name="naamUser" type="text" placeholder="Naam" required>
<input class="invoeren" name="nummerUser" type="text" placeholder="Telefoonnummer" required>
<input class="invoeren" name="onderwerpUser" type="text" placeholder="Onderwerp" required>
<textarea class="invoeren" type="text" name="opmerkingUser" placeholder="Opmerking" required></textarea>
<button type="submit" id="contactButton">Verstuur</button>
</form>

我的 mail.php 文件:

<?php 
ob_start();

$naamUser = $_POST['naamUser'];
$nummerUser = $_POST['nummerUser'];
$onderwerpUser = $_POST['onderwerpUser'];
$opmerkingUser = $_POST['opmerkingUser'];


$formcontent="Aanvraag formulier Domein naam \n
Naam: $naamUser \n
Telefoonnummer: $nummerUser \n
Onderwerp: $onderwerpUser \n
Opmerking: $opmerkingUser \n
";

$recipient = "email@email.nl";

$subject = "Terug Bellen";

$mailheader = "From: $naamUser \r\n";

mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
?>

我将 1 个 mail.php 文件用于多个 index.html 文件,这可能是它死掉的原因吗?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com