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   Parents want to be a good mirror for...   Ji'nan spring outing guide, let's go...   When she was 64 years old, she appea...   The woman was abandoned 28 years ago...   If you find health food illegal, you...
rand   The difference of PHP array traversa...   PHP gets the intersection and differ...   PHP determines to compare the data i...   PHP array usage   PHP force download file (click TXT f...
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