Forms
The best know form on the web is the Google search box.
Form allows users to perform many functions on-line, for example, registering as a member of a website, sign up for news letter, shopping on-line, etc.
Every <form> element requires an action attribute. Its value is the URL for the page on the server that will receive the information in the form when it is submitted.
For our class, we will simply use a "mailto" form which does not involve any back end php nor CGI script. A "mailto" form emails the data collected by the form to the email address.
<form action="mailto:[email protected]" method="post">
There are two methods you can use when sending forms: get or post.
With the get method, the values from the form are added to the end of the URL specified in the action attribute. With the post method the values are sent in what are known as HTTP headers.
The get method is ideal for:
Form allows users to perform many functions on-line, for example, registering as a member of a website, sign up for news letter, shopping on-line, etc.
Every <form> element requires an action attribute. Its value is the URL for the page on the server that will receive the information in the form when it is submitted.
For our class, we will simply use a "mailto" form which does not involve any back end php nor CGI script. A "mailto" form emails the data collected by the form to the email address.
<form action="mailto:[email protected]" method="post">
There are two methods you can use when sending forms: get or post.
With the get method, the values from the form are added to the end of the URL specified in the action attribute. With the post method the values are sent in what are known as HTTP headers.
The get method is ideal for:
- short forms (ex: a search box)
- when you are just retrieving data from the web server and not sending information that should be added to or deleted from a database.
- allow user to upload a fiel
- collect data with a long form
- collect data with sensitive information such as passwords
- add information to or deletes information from a database.