$_GET . Undefined Variable. Cant find solution [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-03 01:21:31

问题


I'm having an issue and am out of ideas.

I'm trying to get a parameter from the URL, but PHP insists in saying that the variable is not defined.

The URL is

http://localhost/trendwatcher/index.php?date=2014-10-18

And the script is something like

<?php include "header.php"; ?>

        <section id="stats">
            Showing trends for <?php echo $GET_["date"];  ?>
        </section>

And finally, the error:

Showing trends for 
Notice: Undefined variable: GET_ in C:\xampp\htdocs\trendwatcher\index.php on line 4

Does anyone have any ideas?

Thanks!


回答1:


Fix your code from:

<section id="stats">
     Showing trends for <?php echo $GET_["date"];  ?>
</section>

to

<section id="stats">
     Showing trends for <?php echo $_GET["date"];  ?>
</section>


来源:https://stackoverflow.com/questions/26457405/get-undefined-variable-cant-find-solution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!