1Webpage to a Database_did_mat1_2 variant

  • pptx
  • 09.05.2020
Публикация на сайте для учителей

Публикация педагогических разработок

Бесплатное участие. Свидетельство автора сразу.
Мгновенные 10 документов в портфолио.

Иконка файла материала 1Webpage to a Database_did_mat1_2 variant.pptx

Linking a Webpage to a Database

10.3.3.3 link a webpage to a database

The

tag sets the form on the web page. The form is intended for data exchange between the user and the server.

Form elements are different types of input elements, like text fields, checkboxes, radio buttons, submit buttons, and more.

Text fields are one line areas that allow the user to input text.

Placeholders

Text inputs can display a placeholder text, that will disappear as soon as some text is entered.

Checkboxes
Checkboxes are form controls that only have 2 states: checked or unchecked. They basically allow the user to say “Yes” or “No” to something.

By default, a checkbox input is unchecked. You can mark it as checked by using the simply called checked attribute.

Radio buttons
You can present the user a list of options to choose from by using radio buttons.
For this form control to work, your HTML code needs to group a list of radio buttons together. This is achieved by using the same value for the name attribute:


Single
Married
Divorced
Widowed

Dropdown menus
If the number of options to choose from takes up too much space, you can use 

Multiple choice dropdown menus
If you add the multiple attribute, you can provide the ability to select multiple choices.

The Submit Button
 defines a button for submitting the form data to a form-handler.
The form-handler is typically a server page with a script for processing input data.
The form-handler is specified in the form's action attribute:

The Action Attribute
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.

The Target Attribute
The target attribute specifies if the submitted result will open in a new browser tab, a frame, or in the current window.
The default value is "_self" which means the form will be submitted in the current window.

The method attribute specifies the HTTP method (GET or POST) to be used when submitting the form data:

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:

Notes on GET:
Appends form-data into the URL in name/value pairs
The length of a URL is limited (about 3000 characters)
Never use GET to send sensitive data! (will be visible in the URL)
Useful for form submissions where a user want to bookmark the result
GET is better for non-secure data, like query strings in Google

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.
Notes on POST:
POST has no size limitations, and can be used to send large amounts of data.
Form submissions with POST cannot be bookmarked

Task 1


Name:




Task 2