MACROMEDIA DREAMWEAVER MX 2004-USING DREAMWEAVER Use Manual page 518

Hide thumbs Also See for DREAMWEAVER MX 2004-USING DREAMWEAVER:
Table of Contents

Advertisement

URL parameters
A URL parameter is a name/value pair appended to a URL. The parameter begins with a question
mark (?) and takes the form
is separated by an ampersand (&). The following example shows a URL parameter with two
name/value pairs:
http://server/path/document?name1=value1&name2=value2
URL parameters let you pass user-supplied information from the browser to the server. When a
server receives a request, and parameters are appended to the URL of the request, the server puts
the parameters at the disposal of the requested page before serving that page to the browser.
In this example, imagine that the application is a web-based storefront. Because the developers of
the site want to reach the widest possible audience, they have designed the site to support foreign
currencies. When users log in to the site, they can select the currency in which to view the prices
of the available items.
The browser requests the page
1
parameter
Currency="euro"
amounts retrieved be displayed as the European Union euro.
The server temporarily stores the URL parameter in memory.
2
The report.cfm page retrieves and uses the parameter to retrieve the cost of items in euros. These
3
monetary amounts can either be stored in a database table of different currencies, or converted
from a single currency associated with each item (any currency supported by the application).
The server sends the report.cfm page to the browser, and displays the value of items in the
4
requested currency. When this user terminates the session, the server destroys the value of the
URL parameter, freeing up server memory to hold the requests of new users logging in to
the site.
http://www.mysite.com/
report.cfm?Currency="¤"
Web browser
URL parameters are created when the HTTP's
HTML form. The
request when the form is submitted.
518
Chapter 32: Obtaining Data for Your Page
. If more than one URL parameter exists, each parameter
name=value
report.cfm
. The
Currency="euro"
method specifies that the parameter value be appended to the URL
GET
from the server. The request includes the URL
variable specifies that all monetary
WEB SERVER
Currency="¤"
<HTML>
</HTML>
report.cfm
method is used in conjunction with an
GET

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER MX 2004-USING DREAMWEAVER and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents