PHP $ _ get html Form (Form) or url data _ PHP Tutorial

Source: Internet
Author: User
PHP $ _ GET gets HTML Form (Form) or url data. I have nothing to do today to tell you that I learned php many years ago to learn how to use get global variables. For more information, see. I. $ _ GET is the method used to get the table. it's nothing to do today. I told you that I learned php many years ago and learned how to use GET global variables, for more information about getting started, see.

1. $ _ GET is used to obtain data in the form of get in the table method.
2. $ _ GET url. php? I = 12 data,
The above is the data we often use get to obtain values,

Instance 1: Get form data

The code is as follows:

Get. php

Assume that I entered www.hzhuti.com

The code is as follows:

You are .


The output result is

The code is as follows:

You are www.hzhuti.com

What is the url style when we click to submit?

The code is as follows:

Get. php? Username = www.hzhuti.com

This form is the second method we are talking about to obtain data. next we will look at using a for reference.

/A. php? Value = my

A. php

The code is as follows:

The value of value is .

The output result is

The code is as follows:

The value of value is my.


This seems to be no different from form's method = get. haha, the article is here.


There is also a way to get, that is, the form of direct $ _ GET, and view the instance.

The code is as follows:


Apple

Orange

Mango


Checkbox. php file code

The code is as follows:

";
Foreach ($ _ GET ["fruit"] as $ value)
{Echo $ value ,"
";
}?>

The output result is


If you choose Orange and Mango


Note that $ _ GET is not suitable for obtaining a large amount of data. the length value cannot exceed 100 characters.

Original site Original tutorial reprint must indicate the source: http://www.bKjia. c0m/phper/php.html

Bytes. 1. $ _ GET is used to obtain the table method...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.