好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

php如何获取get提交的参数

在PHP中,如果想要获取通过get方法提交的数据,可以通过$_GET对象来获取(虽然参数在地址栏中可以查看)

HTML代码:下面就是一个简单的表单代码,将数据提交到01.php,使用get的方式 (推荐学习:PHP视频教程)

<form action="01.php" method="get" >
  <label for="">姓名:
 <input type="text" name= "userName"></label>
 <br/>
  <label for="">邮箱:
 <input type="text" name= "userEmail"></label>
 <br/>
 <input type="submit" name="">
</form> 

PHP代码:

<?php 
    echo "<h1>GET_PAGE</h1>";
    echo 'userName:'.$_GET['userName'];
    echo '<br/>';
    echo 'userEmail:'.$_GET['userEmail'];
 ?> 

以上就是php如何获取get提交的参数的详细内容,更多请关注Gxl网其它相关文章!

查看更多关于php如何获取get提交的参数的详细内容...

  阅读:56次