PHP中的错误(Noobie用户)

PHP中的错误(Noobie用户),php,syntax,syntax-error,Php,Syntax,Syntax Error,我实际上在学习PHP,但我在运行时发现了这个错误 解析错误:语法错误,第13行C:\xampp\htdocs\lols.php中出现意外的'if'T\u if 看不到我的错误吗?你愿意帮我吗 <!DOCTYPE HTML> <html> <head> <title>PHP</title> </head> <body> <?php $name = $email = $gend

我实际上在学习PHP,但我在运行时发现了这个错误

解析错误:语法错误,第13行C:\xampp\htdocs\lols.php中出现意外的'if'T\u if

看不到我的错误吗?你愿意帮我吗

<!DOCTYPE HTML> 
<html>
<head>
    <title>PHP</title>
</head>
<body>

    <?php 


    $name = $email = $gender = ""

    if ($_SERVER["REQUEST_METHOD"] == "POST"){

        $name = testdata($_POST["name"]);
        $email = testdata($_POST["email"]);
        $gender = testdata($_POST["gender"]);
    }

    function testdata($data){

        $data = trim($data);
        $data = stripcslashes($data);
        $data = htmlspecialchars($data);

        return $data;

    }
     ?>
    <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>">

        Name:   <input type="text" name="name">
        E-mail: <input type="text" name="email">

        Gender: <input type="radio" name="gender" value="male"> male
                <input type="radio" name="gender" value="female"> female
        <input type="submit" name="submit" value="Submit"> 
    </form>



  </body>
  </html>

以…结束这条线;分号

$name = $email = $gender = "";

文档:

缺少分号:

$name = $email = $gender = "";

我建议您学习调试代码。如果你找不到错误,你可以用://注释行,中间的大部分代码:/**/Lol,现在我觉得自己很愚蠢,哈哈,谢谢!