1. Technology
Send to a Friend via Email

Query String



A query string is a part of a URL. Specifically, the part of a URL following a question mark (?). For example:


The most common place you will see a query string is on search engines. When you search for something, the search parameters are included in the URL. But query strings are also used on dynamic web pages.

How to Create a Query String

The most common way to add a query string to your URLs is with a FORM element. By using the method attribute set to get, for example:

<form method="get">

You can also use scripts to add to the query string or simply write your links with the query strings in the href attribute.



©2014 About.com. All rights reserved.