代码如图:(比较简单,就是一个input输入框和input提交按钮,注意type为submit,而不是button)

Home  >  Article  >  Web Front-end  >  HTML form value passing example is passed through get method_HTML/Xhtml_Web page production

HTML form value passing example is passed through get method_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:37:282509browse

The google.html interface is as shown in the figure

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

Copy code
The code is as follows:

















google.php The code is as shown in the figure: ($_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:

print "
"; <br>print_r($_GET); <br>print "
";
?>

The running result is as shown in the figure:
Statement:
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