$_GET命令中的PHP不能作为字符串工作


PHP in $_GET command not working as a string

我创建了以下php

 <?php
if (isset($_GET["user_name"]) && !empty($_GET["user_name"])) {
        if(strtolower($_GET("user_name")) == "pulkit") {
            echo "Cool You are the Best";
        }
    }
?>
<form action="test1.php" method="GET">
Name: <input type="text" name="user_name"><br><br>
        <input type="submit" value="Submit">
</form>    

现在,当我运行php时,我得到错误:
致命错误:函数名称必须是第3行上C:''wamp''www''test''test1.php中的字符串

现在的问题是$_GET("user_name")没有以字符串的形式给出结果。为什么以及如何修复它并从表单中获取用户名。任何帮助都将被视为

更改此行

if(strtolower($_GET("user_name")) == "pulkit") {

到这个

if(strtolower($_GET["user_name"]) == "pulkit") {

它不是CCD_ 1,它的相位是CCD_

看看你的第三行,你在得到它时犯了一个错误,应该是这样的

if(strtolower($_GET["user_name"]) == "pulkit") {