我制作了一个表格,将数据通过电子邮件发送到电子邮件 ID。但是在填写表单并提交后,浏览器会说:
服务器错误。该网站在检索 时遇到错误
http://localhost/process.php
。
这是代码:
form1.html
<html>
<head>
<title>Form</title>
</head>
<body>
<form method = "post" action = "process.php">
Enter your name <input type = "text" name = "namee" id = "namee" value = "enter your name" />
Enter your phone number <input type = "text" name = "phone" id = "phone" />
<br>
<input type = "submit" value = "post it!" />
</form>
</body>
</html>
进程.php
<?php
$person_name = $_POST["namee"];
$person_number = $_POST["phone"];
$to = "example234671_1@gmail.com";
$subject = "form filled up";
$body = $person_name. "<br>" $person_number . "<br>" . $person_name ;
mail($to, $subject, $body);
echo "Thank you!" ;
?>
错误是什么??