Use of get, request, and post in PHP

time:14-10-14 forum:PHP tools and code
  http://www.3code.cn/php-get-request-post/

1. get use method example:.Lt;; $id=$_GET['id'];;.Gt;

2. post

post applies to the post form submitted in the form of post.
examples of use methods:.Lt;? $id=$_POST['id'];?.gt;

3. request

REQUEST for QUERY_STRING (URL) information after "?" and the forms submitted in the manner or manner.
that is to say REQUEST is suitable for functions of get or post.
usage example:.Lt;; $id=$_REQUEST['id'];;.Gt;

note: ID is a variable submitted by form or URL.

form submission examples:
[code].lt; form action=.quot; foo.php.quot; method=.quot; POST.quot;.Gt;
Name:. Quot; submit.quot; name=.quot; submit.quot; value=.quot; Submit me!.quot; /.gt;
.lt;
  • 2

prev:Junior high school students invented the... next:PHP methods to prevent repeated submissi...
post comment
Notice



approved   Chongqing version of "peach sister":...   Returnees in mountainous areas suppo...   Where is the old Ji'nan? More than 3...   A small set of fingers can adjust th...   In the mountains, after 80 years hai...
rand   Chinese character intercepting funct...   Converting strings to arrays with PH...   PHP removes the last character subst...   PHP extracts the numbers in a string   PHP determines to compare the data i...
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com