Example Data Form.
Basically, there are two ways to deal with data from HTML forms:
-
Process the data locally (in the browser on your computer) using JavaScript.
- A common use for this is to verify that all required form fields have been filled out before submitting the data to the server.
- The first two fields below use pure HTML to validate the required fields, but JavaScript allows for much more customized validation.
-
Submit the data to the server for processing there.
- This form submits to a simple script on the server which simply echo's the form's data back as a response.
- For real applications, the form's data is usually stored into a relational database on the server.