How the Web Works with Databases


The search begins on a web page that includes a form field to accept search terms and HTML codes to execute a CGI script. The browser might pass the data to the web server in a query string. The query stringcontains the name of the CGI script in a directory called cgi-bin. This directory is followed by search parameters that include the search terms, separated by ampersands (the character "&"). A question mark is used to separate the name of the script or document from the arguments that are to be passed to it. Certain characters must be encoded when passed in a URL. Spaces, for example, are replaced by plus signs "+". So the HTML code for a search might look like this:


<a href="cgi-bin/search?name=preston+gralla&state=ma">.



 



How the Internet Works
How the Internet Works (8th Edition)
ISBN: 0789736268
EAN: 2147483647
Year: 2004
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net