PHP localhost提交404错误


php localhost sumbmission 404 error

我根据答案修复了大部分问题,但似乎有更多的错误我没有足够的知识来找到,我添加了一个名称提交按钮,我运行它与开发人员工具监控,它说错误是与打开php标签和一个明显不平衡的

标签,任何帮助将是感激
<!DOCTYPE html>
<html>
    <head>
        <title>Submit a Report</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <h2>Send a report to our administrators</h2>
        <form method="POST" action="ReportForm.php">
            Offending Player's username:<br>
            <input type="text" name="theirName"><br><br>
            What did they do?:<br>
            <input type="text" name="message" size="10"><br><br>
            Your Minecraft Username:<br>
            <input type="text" id="yourName" name="yourName"><br><br>
            <input type="submit" name="Send" value="Send">
            <input type="reset" value="Reset">
        </form>
    </body>
</html>
<?php
$name = $_POST['yourName'];
$playerName = $_POST['theirName'];
$message = $_POST['message'];
$email_to = 'reports.ahricraft@gmail.com';
$email_subject = "Issue with Player";
$email_body = "From: $name'n Offending player: $playerName'n Reason for report:'n $message";
mail($email_to, $email_subject, $email_body);
if ($_POST["Send"]) {
    if (mail($email_to, $email_subject, $email_body)) {
        echo '<p>Your message has been sent!</p>';
    } else {
        echo '<p>Something went wrong, go back and try again!</p>';
    }
}
?>

(关于未收到…)

我认为应该是:

if ($_POST["Send"]) {

您的提交按钮名称值中有"Send"