HTML
Chapter 7.Forms
How Forms Work A user fills in a form and then presses a button to submit the information to the server.
The name of each form control is sent to the server along with the value the user enters or selects.
The server processes the information using a programming language such as PHP, C#, VB.net, or Java. It may also store the information in a database.
The server creates a new page to send back to the browser based on the information received.
A form may have several form controls, each gathering different information. The server needs to know which piece of inputted data corresponds with which form element.
To differentiate between various pieces of inputted data, information is sent from the browser to the server using name/value pairs. In this example, the form asks for the visitor’s username and also for their favorite jazz musician. The name/value pairs sent to the server are:
If the form control allows the user to enter text, then the value of the form control is whatever the user has typed in.
If the form control allows you to choose from a fixed set of answers (e.g. radio buttons, checkboxes or a drop down list), the web page author will add code that gives each option an automatic value.
FORMS Summary:
- Whenever you want to collect information from visitors you will need a form, which lives inside a