Use of GET variables in PHP

Source: Internet
Author: User

Author: sports98 2002-8-16
After PHP4.1.0, HTTP_GET_VARS is saved using the GET variable. The GET variable mainly comes from the following methods:
For example, the URL that requests the server to obtain information, use the form method as the get method. In this way, all request variables will pass
The URL is passed to the server, and the server calls the relevant interpreter according to the configuration to process these GET variables.
    
This article discusses how to pass values in url get mode.
We all know that the URL value is URL? Variable name = variable value
For example
? Page = 1
This method is common to us.
If there are more variables, use the '&' symbol to connect to the variable.
Example :? Page = 1 & title = Welcome % 20Sports98
The above method is to convert the variables directly to the corresponding array in the browser, so we don't need to know much about it. The topics I want to discuss are as follows:
For example:
? Page = 1, Welcome % 20Sports98, Sports98, 300
In this example, we use the ',' symbol as the variable Separator. Here we can use two methods to implement it,
1. Modify PHP. INI
--
; List of separator (s) used by PHP to parse input URLs into variables.
; Default is "&".
; NOTE: Every character in this directive is considered as separator!
Arg_separator.input = ";,"
----
2. Write the explanation Syntax by yourself
List ($ key, $ value) = $ _ GET; // splits the GET variable out.
$ Tmp = explode (",", $ value); // separates data
The advantage of this usage is that others cannot know who is using the value you passed, and you need to understand the usage of each value.

 

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.