Processing Forms


Whether your form is intended to submit information to or retrieve information from a database, perform a search function, or otherwise process data, you need to define what will happen with that data and how it will be handled to make your form functional. This definition is done through Action and Method options in the Property inspector while the form is selected. To select the form, place the insertion point somewhere within the form and click the <form#training> tag in the tag selector.

You can use Dreamweaver to develop dynamic Web pages and applications that can be used to process forms and make use of databases. Creating and working with a dynamic, database-enabled Website requires a connection to a server. The type of server and its configuration determine which scripting language (such as PHP, ASP, JSP and ColdFusion) can be used. Because creating a site that makes use of dynamic pages and databases is beyond the scope of this book and because you might not have access to a server with the dynamic pages or CGI scripts needed to process forms while you complete this lesson, the following information is presented as reference material only. Talk to your Internet Service Provider (ISP) or Web administrator to get the information you need to set the Action and Method options to work with the scripts used on your server.

  • Action tells the browser what to do with the form data. It specifies the path or URL to the location and the name of a server-side application (usually a CGI script or a dynamic page) that processes the information when the user clicks the Submit button. CGI scripts are located on the Web server that processes the data sent by a form.

    Method defines how the form data is handled: GET, POST, or Default. Data sent by a form is a continuous string of text from the information typed by the user. GET appends form contents to the URL specified in the Action text field; that information is therefore visible in the browser's address bar. GET is not a secure method of transferring data, so it should not be used for sensitive information such as credit card information or Social Security numbers. The GET method can send only a limited amount of information because restrictions are often imposed on the lengths of URLs by browsers and servers. This limitation can vary, so the GET method is also not a good choice for forms in which the visitor might have entered a lot of informationlong forms lose any information exceeding the size or length restriction. The POST method, on the other hand, is capable of sending far more information and is more reliable and secure. It is the most common method used in scripts to send form data. POST uses an HTTP request to send the form value in the body of a message. Default uses the browser's default method, which is usually GET.




Macromedia Dreamweaver 8(c) Training from the Source
Macromedia Dreamweaver 8: Training from the Source
ISBN: 0321336267
EAN: 2147483647
Year: 2006
Pages: 326

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