Home > Backend Development > PHP Tutorial > Example of PHP using super global variable $_GET to receive form data

Example of PHP using super global variable $_GET to receive form data

高洛峰
Release: 2023-03-04 10:06:01
Original
1471 people have browsed it

We use touch php_get.html php_get.php to create two files on linux.

The code of the php_get.html file is as follows:

<!doctype html>
<html>
<head>
<title>超级全局变量$_GET来接收提交的数据,然后返回信息</title>
<meta http-equiv="contnet-type" content="text/htm" charset="utf-8"/>
</head>
<body>
<a style="font-weight:bold;color:red;" href="php_get.php?subject=主题&web=web内容">利用GET方式提交数据</a>
</body>
</html>
Copy after login

Visit the php_get.html page and then this page submits data to php_get.php, php this The page will return information.

php_get.php code is as follows:

<!dcotype html>
<html>
<head>
<title>返回信息</title>
<meta http-equiv="content-type" content="text/html" charset="utf-8"/>
</head>
<body>
<?php
echo "print:".$_GET[&#39;subject&#39;]."at".$_GET[&#39;web&#39;];
?>
</body>
</html>
Copy after login

php_get.php This page will receive and print out the submitted data $_GET.

Example of PHP using super global variable $_GET to receive form data

Example of PHP using super global variable $_GET to receive form data

The above example of PHP using the super global variable $_GET to receive form data is all the content shared by the editor. , I hope it can give everyone a reference, and I also hope everyone will support the PHP Chinese website.

For more related articles on examples of PHP using the super global variable $_GET to receive form data, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template