O'Reilly logo

Dreamweaver in a Nutshell by Bruce A. Epstein, Heather Williamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Forms

HTML forms provide a means of collecting information, such as customer data, to be submitted to a server.

A form has three attributes available through the Property inspector that control the interaction of the form with a processing program on your server.

Form Name

Any unique alphanumeric string. This attribute can be referenced by scripts, which may perform different actions based on the entries in the form.

Action

Action to be taken when the Submit button on the form is clicked. This attribute is usually the URL of a script written in Perl (.pl or.cgi), Active Server Pages (.asp), ColdFusion (.cfm), or JavaServer Pages (.jsp), such as one of the following examples:

/cgi-bin/formmail.pl
http://someserver.scriptresources.com/cgi-bin/whatever.asp
Method

The HTTP method—either GET or POST—used to submit the form data. GET appends the form fields to the URL specified by the Action attribute. GET is limited to ASCII data no larger than 8 KB (the maximum size varies by browser, but is usually at least 1 KB). The POST method sends the form data directly to the processing agent specified by the Action attribute. POST does not impose any size restriction and is required when using File Fields to upload files. Furthermore, GET is insecure, whereas POST can handle nontext data such as encrypted files.

To create a form:

  1. Provide some introductory text to explain the purpose of the form and what will be done with the submitted data. Include a link to a privacy policy statement. Depending ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required