Home  >  Article  >  Web Front-end  >  HTML form value passing example is passed through get method

HTML form value passing example is passed through get method

高洛峰
高洛峰Original
2017-02-23 13:41:033182browse

google.html The interface is as shown


HTML form value passing example is passed through get method

The code is as shown: (relatively simple, it is an input input box and input submit button, pay attention to the type For submit, not button)

 
 
<title>Winbobo</title> 
 
 
<div> 
<form> 
<input> 
 
<input> 
</form> 
</div> 
 

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

<?php  
print "<pre class="brush:php;toolbar:false">"; 
print_r($_GET); 
print "
";  ?>

The running result is as shown in the figure:

HTML form value passing example is passed through get method


For more examples of HTML form value passing through get method, please pay attention to related articles. PHP Chinese website!


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