18.1. How HTML Forms Transmit Data

HTML forms let you create a variety of user interface controls to collect input on a Web page. Each of the controls typically has a name and a value; the name is specified in the HTML, and the value comes either from the HTML or from user input. The entire form is associated with the URL of a program that will process the data. When the user submits the form (usually by pressing a button), the names and values of the controls are sent to the designated URL as a string of the form

Name1=Value1&Name2=Value2...NameN=ValueN
					

This string can be sent to the designated program in one of two ways. The first, which uses the HTTP GET method, appends the string to the end of the specified URL, after a question mark. The ...

Get Core Web Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.