HTML form value transfer example through get method

HTML form value transfer example through get method
The google.html interface is as shown in the figure

The code is as shown in the figure: (relatively simple, just an input input box and an input submit button. Note that type is submit, not button)

Copy code
The code is as follows:

<html>
<head>
<title>Winbobo</title>
</head>
<body>
<div align="center">
<form action="google.php" method="get">
<input name="q" type="text"/>
</br>
<input name="btnSearch" type="submit" value="Search" />
</form>
</div>
</body>
</html>

The code of google.php is as follows: ($_GET is used to obtain the data passed by the form through the get method; $_POST is used to obtain the data passed by the form through the post method)

Copy code
The code is as follows:

<?php
print "<pre>";
print_r($_GET);
print "</pre>";
?>

The running results are shown in the figure:

<<:  Five guidelines to help you write maintainable CSS code

>>:  MySQL date and time addition and subtraction sample code

Recommend

Detailed tutorial on installing MySQL 8.0 from source code on CentOS 7.4

Table of contents 1. Environment 2. Preparation 3...

Detailed tutorial on installing MySQL 5.7.20 on RedHat 6.5/CentOS 6.5

Download the rpm installation package MySQL offic...

JavaScript Shorthand Tips

Table of contents 1. Merge arrays 2. Merge arrays...

MySql multi-condition query statement with OR keyword

The previous article introduced the MySql multi-c...

How to monitor array changes in JavaScript

Preface When introducing defineProperty before, I...

5 basic skills of topic page design (Alibaba UED Shanmu)

This topic is an internal sharing in the second h...

How to set Nginx log printing post request parameters

【Foreword】 The SMS function of our project is to ...

CSS implements Google Material Design text input box style (recommended)

Hello everyone, today I want to share with you ho...

HTML meta viewport attribute description

What is a Viewport Mobile browsers place web page...

Modify the style of HTML body in JS

Table of contents 1. Original Definition 2. JS op...

Detailed explanation of the principle and function of Vue list rendering key

Table of contents The principle and function of l...

Usage of HTML H title tag

The usage of H tags, especially h1, has always bee...

MySQL statement execution order and writing order example analysis

The complete syntax of the select statement is: S...