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

Using Vue3 (Part 1) Creating a Vue CLI Project

Table of contents 1. Official Documentation 2. Cr...

How to use watch listeners in Vue2 and Vue3

watch : listen for data changes (change events of...

Element-ui's built-in two remote search (fuzzy query) usage explanation

Problem Description There is a type of query call...

Optimize the storage efficiency of BLOB and TEXT columns in InnoDB tables

First, let's introduce a few key points about...

Image scrolling effect made with CSS3

Achieve resultsImplementation Code html <base ...

MySQL multi-table query detailed explanation

Time always passes surprisingly fast without us n...

Using HTML to implement a voting website cheating scheme that restricts IP

This is a cheating scheme for voting websites wit...

Summary of various methods for JavaScript to determine whether it is an array

Table of contents Preface Array.isArray construct...

About uniApp editor WeChat sliding problem

The uniapp applet will have a similar drop-down p...

js realizes 3D sound effects through audioContext

This article shares the specific code of js to ac...

js native waterfall flow plug-in production

This article shares the specific code of the js n...

How to find the my.ini configuration file in MySQL 5.6 under Windows

Make a note so you can come back and check it lat...

Detailed explanation of deploying MySQL using Docker (data persistence)

This article briefly describes how to use Docker ...

Detailed explanation of selinux basic configuration tutorial in Linux

selinux ( Security-Enhanced Linux) is a Linux ker...

Vue component library ElementUI realizes the paging effect of table list

ElementUI implements the table list paging effect...