learnTrack / Q-A

Questions and Answers
10 stars 0 forks source link

What is a query string? #1

Open heron2014 opened 9 years ago

heron2014 commented 9 years ago

Query string is the part of a uniform resource locator (URL), it's a set of characters automatically input in the address bar of a dynamic Web site when a user makes a request for information according to certain criteria.

The querystring follows a separating character, usually a question mark (?)

For example:

http://www.bookfinder4u.com/search_author/Ernest_Hemingway.html?sort=date

The querystring in this example consists of one field or variable, technically called a key in this context (here, it is the word "sort"), followed by an equals sign (=), followed by the value for that key (here, it is the word "date").

Each key and its corresponding value, denoted as an equation, is called a key-value pair. A querystring may contain several key-value pairs. When there is more than one key-value pair, they are typically separated by ampersands (&).