ya, because no action.<form action="filename.php" method="get">

解决方案 »

  1.   

    and.. you should not echo $hehe.should be
    echo $_GET['hehe'];
      

  2.   

    $hehe=$_GET['hehe'];$hehe=$_POST['hehe'];记住要大写才行。
      

  3.   

    从4.1以后的PHP数值的传递都用上面的那种方法,GET的用$_GET['***'],POST的是$_POST['***'].
      

  4.   

    用GET方法是:
    <form method="get" action=''>
    <input type="text" name="hehe"><br>
    <input type="submit" value="提交"><br>
    </form>
    <?php 
    if(isset($_GET['hehe']))
    {
        echo("欢迎".$_GET['hehe']);
    }
    ?>
    用POST也一样:
    <?php 
    if(isset($_POST['hehe']))
    {
        echo("welcome".$_POST['hehe']."!");
    }
    ?>
      

  5.   

    http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=178564
      

  6.   

    get,post,session在最新的php版本中自动全局变量是关闭的,所以要从上一页面取得提交过来得变量要使用$_GET['foo'],$_POST['foo'],$_SESSION['foo']来得到  
    当然也可以修改自动全局变量为开(php.ini改为register_globals  =  On)
      

  7.   

    sdudyfrom(心灵海洋) 说的不错,还有一点补充,记得要重启服务才会有效的。
      

  8.   

    或者你 
    extract($_POST);
    extract($_GET);
    echo $hehe;