PHP 表单提交时出现 HTTP 错误 500

PHP form on submit gives HTTP error 500

我的 html 中有一个带有提交按钮的 PHP 表单。 但是,当我按下提交按钮时,我的浏览器出现错误 -> HTTP 错误 500。

我在其他网站上使用相同类型的 PHP 表单,在那里工作正常...有人看到这里的问题吗?

表单和 HTML 下面的代码段。

<?php

$lidworden = $_POST['lidworden']
$projectsponsoring = $_POST['projectsponsoring'];
$leo = $_POST['leo'];
$lion = $_POST['lion'];
$andere = $_POST['andere'];
$naam = $_POST['naam'];
$email = $_POST['email'];
$bericht = $_POST['bericht'];

$to = "info@pieterswebdesign.com";
$subject = "Leo Club de 4 Ambachten";
$body = "Dit is een automatisch bericht gelieve hier niet op te reageren. \n\n $lidworden,$projectsponsoring,$leo,$lion,$andere,$Naam,$Email,$Telefoon,$Bericht";

mail($to,$subject,$body);
header("Location: index.html");

exit();
?>
<form id="form" action="send.php" method="POST">

  <p id="radiotitle"><span class="bluetxt">Je bent</p>

        <div id="radiodiv">
            <label class="label">
                <input type="radio" name="lidworden" value="lidworden" />geïnteresseerd om lid te worden
            </label>
            <label class="label">
                <input type="radio" name="projectsponsoring" value="projectsponsoring" />geïnteresseerd in projectsponsoring
            </label>
            <label class="label">
                <input type="radio" name="leo" value="leo"/>een Leo
            </label>
            <label class="label">
                <input type="radio" name="lion" value="lion"/>een Lion
            </label>
            <label class="label">
                <input type="radio" name="andere" value="andere"/>andere
            </label>
        </div>

        <div id="textdiv">
                    <label class="label2">Je naam</label>
                        <input type="text" name="naam" placeholder="Typ hier..." />

                        <label class="label2">Je e-mailadres</label>
                            <input type="text" name="email"  placeholder="Typ hier..." />

                            <label class="label2">Je bericht</label>
                                <textarea type="text" name="bericht" value="bericht" placeholder="Typ hier..."></textarea>

            <button type="submit" id="sendbutton"><p>VERSTUUR</p></button>
        </div>
    </form>

错别字:

<?php

$lidworden = $_POST['lidworden']
                                ^---missing ;

导致致命的解析错误...因为您显然没有看到错误消息,所以您 运行 display_errors 和 error_reporting 被禁用了。他们应该从不 在devel/debug 系统上关闭。相当于把手指塞进耳朵里去"lalalala can't hear you".