CSCI 121 - Lecture 8 - Advanced Forms
Topics Covered
- <form> - Form element
- action attribute - defines how to submit a form
- The action attribute defines the action to be performed when the form is submitted.
- Normally, the form data is sent to a web page on the server when the user clicks on the submit button.
- method attribute - defines the form submission method
- The method attribute specifies the HTTP method (GET or POST) to be used when submitting the form data:
- <form action="action_page.php" method="get">
- The default method when submitting form data is GET.
- However, when GET is used, the submitted form data will be visible in the page address field.
- <form action="action_page.php" method="post">
- Always use POST if the form data contains sensitive or personal information. The POST method does not display the submitted form data in the page address field.
- POST has no size limitations, and can be used to send large amounts of data.
Sample Page
- Sample page for the lecture here.
Instructor's Notes