在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免费学习笔记(深入)”;











