Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


The FORM Tag

	<FORM METHOD="POST" ACTION="/cgi-bin/web-exe">
		Form elements and other HTML 
	</FORM>
There can be several forms in a single document, but the FORM element can't be nested. ACTION
specifies the action URI for the form. This URI will almost always point to a CGI script to decode the form results; but it could, for example, be a mailto.

METHOD
selects an HTTP method of accessing the action URI. There are two methods, GET (the default) and POST. Generally speaking, you use GET for only the simplest forms, or when you want the user to be able to bookmark the query or use it as a link - it will work just as if the user had filled in the form as before and submitted it. Use POST for forms with a lot of fields (GET might not be able to pass all the data) and for scripts that are supposed to change something on the server - you normally don't want anyone to do that from a bookmark or link.

METHOD=GET
Information from a form using the GET method is appended onto the end of the action URI being requested. Your CGI program will receive the encoded form input in the environment variable QUERY_STRING.

METHOD=POST
This method transmits all form input information immediately after the requested URI. Your CGI program will receive the encoded form input on stdin. The server will NOT send you an EOF on the end of the data, instead you should use the environment variable CONTENT_LENGTH to determine how much data you should read from stdin.

ENCTYPE
specifies the media type used to encode the name/value pairs for transport, in case the protocol does not itself impose a format. With the POST method, the ENCTYPE attribute is a media type specifying the format of the posted data (by default application/x-www-form-urlencoded). Rarely used (??).



Up to => Home / Authoring / HTML / Forms




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers