我的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>
答案 0 :(得分:1)
错别字:
<?php
$lidworden = $_POST['lidworden']
^---missing ;
导致致命的解析错误...由于您显然没有看到错误消息,因此您正在运行display_errors并禁用error_reporting。他们应该在开发/调试系统上从不关闭。这相当于将手指塞进耳朵并且“lalalala听不到你”。