<form action="" method="POST"> 
<input name="name" type="text"> 
<input type="submit" value="提交"> 
</form> <? echo "hello".$name;?>
这样试试

解决方案 »

  1.   

    http://localhost/index.php?name=hello world
    用这种方式打开浏览器看!!!
      

  2.   

    这个程序是可以运行的。可能你配置有问题,如果你的报错打开的话页面载入是就应该报错name变量未定义...
    你可以从你的配置找问题,建议你用phpinfo()
    phpinfo.php
    <?php
        phpinfo();
    ?>
      

  3.   

    <?php 
    $name = $_GET['name']; 
    echo "hello".$name;?>  
    ?>