宝哥软件园

PHP使用超级全局变量$_GET来接收表单数据的实例

编辑:宝哥软件园 来源:互联网 时间:2021-09-13

在linux上,我们使用touch php_get.html php_get.php来创建两个文件。

php_get.html文件的代码如下:

!Doctype htmlhtmlheadtitle超级全局变量$_GET,接收提交的数据,然后返回消息/title meta http-equiv=' cont net-type ' content=' text/htm ' charset=' utf-8 '/head dya style=' font-weight 3360 bold;' color:red'href='php_get.php?Subject=topic web=web content '通过GET /a/body/html提交数据访问php_get.html页面,然后这个页面将数据提交给php_get.php,php将返回信息。

php_get.php的代码如下:

!dcotype htmlhtmlheadtitle返回信息/title meta http-equiv=' content-type ' content=' text/html ' charset=' utf-8 '/head dy?phpecho“print :”。$_GET['subject']。在。$ _ GET[' web '];/body/htmlphp_get.php,这个页面接收并打印提交的数据$_GET。

上面PHP使用超级全局变量$_GET接收表单数据的例子就是边肖分享的全部内容。希望能给大家一个参考,支持我们。

更多资讯
游戏推荐
更多+