php如何获取get提交的参数
php如何获取get提交的参数详细介绍
在PHP中,如果想要获取通过get方法提交的数据,可以通过$_GET对象来获取。
HTML代码:
<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'];
?>