CGI & HTML forms -05-. CGI Common Gateway Interface  A web server is only a pipe between user-agents  and content – it does not generate content.

Slides:



Advertisements
Similar presentations
LIS651 lecture 0 forms Thomas Krichel
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
23-Aug-14 HTML/XHTML Forms. 2 What are forms? is just another kind of XHTML/HTML tag Forms are used to create (rather primitive) GUIs on Web pages Usually.
24-Aug-14 HTML Forms. 2 What are forms? is just another kind of HTML tag HTML forms are used to create (rather primitive) GUIs on Web pages Usually the.
CS 22: Enhanced Web Site Design - Week 8Slide 1 of 15 Enhanced Web Site Design Stanford University Continuing Studies CS 22 Mark Branom
1/16 Steven Leung Introduction to HTML/CGI/JavaScript Intro to HTML/CGI/JavaScript How the Web Works HTML: Basic Concept CGI: Basic Concept JavaScript:
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
The Web Warrior Guide to Web Design Technologies
Common Gateway Interface (CGI). CGI is a protocol: CGI is not a programming language CGI is a protocol for the exchange of information between between.
JavaScript Forms Form Validation Cookies CGI Programs.
Tutorial 6 Working with Web Forms
World Wide Web1 Applications World Wide Web. 2 Introduction What is hypertext model? Use of hypertext in World Wide Web (WWW) – HTML. WWW client-server.
1 Static Web Pages Websites on Servers (The Big Picture) –Apache Tomcat can support static web pages –Primarily intended to support servlets and JSP –Some.
CS 898N – Advanced World Wide Web Technologies Lecture 6: PERL and CGI Chin-Chih Chang
Python and Web Programming
USER INTERACTIONS: FORMS
Hypertext Transport Protocol CS Dick Steflik.
CGI Programming: Part 1. What is CGI? CGI = Common Gateway Interface Provides a standardized way for web browsers to: –Call programs on a server. –Pass.
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
1 ‘Dynamic’ Web Pages So far, we have developed ‘static’ web-pages, e.g., cv.html, repair.html and order.html. There is often a requirement to produce.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
4-Sep-15 HTML Forms Mrs. Goins Web Design Class. Parts of a Web Form A Form is an area that can contain Form Control/Elements. Each piece of information.
Overview A plain HTML document is static A CGI program is executed in real-time, so that it can output dynamic information. CGI (Common Gateway Interface)
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
1 Forms A form is the usual way that information is gotten from a browser to a server –HTML has tags to create a collection of objects that implement this.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
1 HTML References: A HTML Tutorial: /HTMLPrimer.html
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 6.
USING PERL FOR CGI PROGRAMMING
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Website Development with PHP and MySQL Saving Data.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
ITCS373: Internet Technology Lecture 5: More HTML.
XHTML & Forms. PHP and the WWW PHP and HTML forms – Forms are the main way users can interact with your PHP scrip Typical usage of the form tag in HTML.
Form Data Encoding GET – URL encoded POST – URL encoded
WWW: an Internet application Bill Chu. © Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains.
Netprog 2002 CGI Programming1 CGI Programming CLIENT HTTP SERVER CGI Program http request http response setenv(), dup(), fork(), exec(),...
Forms Collecting Data CSS Class 5. Forms Create a form Add text box Add labels Add check boxes and radio buttons Build a drop-down list Group drop-down.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
 Previous lessons have focused on client-side scripts  Programs embedded in the page’s HTML code  Can also execute scripts on the server  Server-side.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Lesson 11. CGI CGI is the interface between a Web page or browser and a Web server that is running a certain program/script. The CGI (Common Gateway Interface)
The Common Gateway Interface (CGI) Pat Morin COMP2405.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
CS 330 Class 7 Comments on Exam Programming plan for today:
HTTP – An overview.
How to Write Web Forms By Mimi Opkins.
Hypertext Transport Protocol
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
MapServer In its most basic form, MapServer is a CGI program that sits inactive on your Web server. When a request is sent to MapServer, it uses.
Chapter 27 WWW and HTTP.
Forms, cont’d.
HTTP GET vs POST SE-2840 Dr. Mark L. Hornick.
William Stallings Data and Computer Communications
World Wide Web Uniform Resource Locator hostname [:port]/path
Presentation transcript:

CGI & HTML forms -05-

CGI Common Gateway Interface  A web server is only a pipe between user-agents  and content – it does not generate content

CGI Common Gateway Interface  A web server is only a pipe between user-agents  and content – it does not generate content  Works well with static content (e.g. html files)

CGI Common Gateway Interface  A web server is only a pipe between user-agents  and content – it does not generate content  Works well with static content, but what about  dynamic content?

CGI Common Gateway Interface  A web server is only a pipe between user-agents  and content – it does not generate content  Works well with static content, but what about  dynamic content?  A web server needs to delegate content generation  to third party applications

CGI Common Gateway Interface  A web server is only a pipe between user-agents  and content – it does not generate content  Works well with static content, but what about  dynamic content?  A web server needs to delegate content generation  to third party applications  Common Gateway Interface is a standard protocol  which defines how to delegate content generation  from a web server to a console application

CGI Common Gateway Interface  If dynamic content generation is required, the web  server invokes console applications as commands

CGI Common Gateway Interface  If dynamic content generation is required, the web These console applications are often called CGI scripts Although they can be written in any programming language, scripting languages are often used  server invokes console applications as commands

CGI Common Gateway Interface  If dynamic content generation is required, the web These console applications are often called CGI scripts Although they can be written in any programming language, scripting languages are often used  server invokes console applications as commands  For example: wikipedia User makes a requests for an entry The web server activates a script which transforms the source of the entry into an HTML document and sends the result to the user

CGI Common Gateway Interface  How do you tell a server to invoke an application  rather than send back its source code/binary form?

CGI Common Gateway Interface The CGI scripts are placed in a special directory recognized by the web server  How do you tell a server to invoke an application  rather than send back its source code/binary form?

CGI Common Gateway Interface The CGI scripts are placed in a special directory recognized by the web server Once there is a request for a resource in that directory, the web server knows to invoke the script/executable rather than return its content  How do you tell a server to invoke an application  rather than send back its source code/binary form?

CGI Common Gateway Interface The CGI scripts are placed in a special directory recognized by the web server Once there is a request for a resource in that directory, the web server knows to invoke the script/executable rather than return its content Usually the directory is called cgi-bin under the web server’s path  How do you tell a server to invoke an application  rather than send back its source code/binary form?

CGI Common Gateway Interface The CGI scripts are placed in a special directory recognized by the web server Once there is a request for a resource in that directory, the web server knows to invoke the script/executable rather than return its content Usually the directory is called cgi-bin under the web server’s path For security reasons only webmasters can update this directory or make it active  How do you tell a server to invoke an application  rather than send back its source code/binary form?

CGI CGI specification

 (e.g. search query) is passed to the command  CGI defines how information about the request CGI CGI specification

 (e.g. search query) is passed to the command  CGI defines how information about the request CGI CGI specification The web server sets the environment variables with proper information

 (e.g. search query) is passed to the command  CGI defines how information about the request CGI CGI specification The web server sets the environment variables with proper information If there is additional content (e.g. a PUT method), then it is passed using stdin

 (e.g. search query) is passed to the command  CGI defines how information about the request CGI CGI specification The web server sets the environment variables with proper information If there is additional content (e.g. a PUT method), then it is passed using stdin  CGI sets rules for the CGI script output and how  it needs to be handled by the web server

 (e.g. search query) is passed to the command  CGI defines how information about the request CGI CGI specification The web server sets the environment variables with proper information If there is additional content (e.g. a PUT method), then it is passed using stdin  CGI sets rules for the CGI script output and how The response is written to stdout  it needs to be handled by the web server

 (e.g. search query) is passed to the command  CGI defines how information about the request CGI CGI specification The web server sets the environment variables with proper information If there is additional content (e.g. a PUT method), then it is passed using stdin  CGI sets rules for the CGI script output and how The response is written to stdout There are two types of response: NPH and CGI  it needs to be handled by the web server

CGI CGI mechanism

 CGI Script execution CGI CGI mechanism The web server acts like an application gateway

CGI CGI mechanism The web server acts like an application gateway as follows: 1.Receives the request from a client  CGI Script execution

CGI CGI mechanism The web server acts like an application gateway as follows: 1.Receives the request from a client 2.Selects a CGI script to handle the request  CGI Script execution

CGI CGI mechanism The web server acts like an application gateway as follows: 1.Receives the request from a client 2.Selects a CGI script to handle the request 3.Converts the client’s request to a CGI request and sets the environment variables  CGI Script execution

CGI CGI mechanism The web server acts like an application gateway as follows: 1.Receives the request from a client 2.Selects a CGI script to handle the request 3.Converts the client’s request to a CGI request and sets the environment variables 4.Executes the script (request data might not be immediately available through stdin)  CGI Script execution

CGI CGI mechanism The web server acts like an application gateway as follows: 1.Receives the request from a client 2.Selects a CGI script to handle the request 3.Converts the client’s request to a CGI request and sets the environment variables 4.Executes the script (request data might not be immediately available through stdin) 5.Converts the CGI response into a response to the client  CGI Script execution

CGI CGI mechanism The web server acts like an application gateway  CGI Script execution Web server CGI script CGI Request Response User Request CGI Response

CGI CGI mechanism The web server acts like an application gateway The web server MAY act in a “non-transparent” manner, modifying the request or response in order to provide some additional service (e.g. media type transformation or protocol reduction)  CGI Script execution

CGI CGI mechanism The web server acts like an application gateway The web server MAY act in a “non-transparent” manner, modifying the request or response in order to provide some additional service (e.g. media type transformation or protocol reduction) The web server has to conform to the client’s request protocol, even if the CGI script fails to  CGI Script execution

CGI CGI mechanism The web server acts like an application gateway The web server MAY act in a “non-transparent” manner, modifying the request or response in order to provide some additional service (e.g. media type transformation or protocol reduction) The web server has to conform to the client’s request protocol, even if the CGI script fails to If authentication is involved, the script can be invoked only if access is granted  CGI Script execution

CGI CGI mechanism  CGI Script selection

CGI CGI mechanism The CGI script is selected based on the request URI  CGI Script selection

CGI CGI mechanism The CGI script is selected based on the request URI The script may match the whole or a leading part of the hierarchical part  CGI Script selection

CGI CGI mechanism The CGI script is selected based on the request URI The script may match the whole or a leading part of the hierarchical part The remainder of the path, if any, is a resource or sub- resource identifier to be interpreted by the script  CGI Script selection

CGI CGI mechanism The CGI script is selected based on the request URI The script may match the whole or a leading part of the hierarchical part The remainder of the path, if any, is a resource or sub- resource identifier to be interpreted by the script Several paths may be associated with the same script  CGI Script selection

CGI CGI Request

CGI CGI Request The variables contain data about the request passed from the server to the script  Meta-variables passed as environment variables

CGI CGI Request The variables contain data about the request passed from the server to the script They are identified by case-insensitive names; there cannot be two different variables whose names differ in case only  Meta-variables passed as environment variables

CGI CGI Request The variables contain data about the request passed from the server to the script They are identified by case-insensitive names; there cannot be two different variables whose names differ in case only Usually they appear as capitals with underscores (e.g. PATH_INFO)  Meta-variables passed as environment variables

CGI CGI Request The variables contain data about the request passed from the server to the script They are identified by case-insensitive names; there cannot be two different variables whose names differ in case only Usually they appear as capitals with underscores (e.g. PATH_INFO) A missing environment variable is equivalent to a zero-length (NULL) value; it is impossible to tell if the value is NULL or missing  Meta-variables passed as environment variables

CGI CGI Request Some variables are set for every request, some don’t  Meta-variables passed as environment variables

CGI CGI Request Some variables are set for every request, some don’t Variables set for every request  Meta-variables passed as environment variables

CGI CGI Request Some variables are set for every request, some don’t Variables set for every request SERVER_SOFTWARE The name and version of the web server SERVER_NAME The server's hostname or IP address GATEWAY_INTERFACE The revision of the CGI specification to which this server complies (e.g. CGI/1.1)  Meta-variables passed as environment variables

CGI CGI Request Some variables are set for every request, some don’t Request specific variables  Meta-variables passed as environment variables

CGI CGI Request Some variables are set for every request, some don’t Request specific variables SERVER_PROTOCOL The name and revision of the protocol this request came in with (e.g. HTTP/1.1) SERVER_PORT The port number to which the request was sent REQUEST_METHOD The method with which the request was made (e.g. POST)  Meta-variables passed as environment variables

CGI CGI Request Some variables are set for every request, some don’t Request specific variables REMOTE_ADDR The IP address of the client REMOTE_HOST The hostname of the client the request  Meta-variables passed as environment variables

CGI CGI Request Some variables are set for every request, some don’t Request specific variables PATH_INFO Identifies the resource or sub-resource derived from the portion of the URI path hierarchy following the part that identifies the script itself PATH_TRANSLATED The server provides a translated version of PATH_INFO, which takes the path and does any virtual-to-physical mapping to it  Meta-variables passed as environment variables

CGI CGI Request Some variables are set for every request, some don’t Request specific variables QUERY_STRING The part of the request URI which follows the first ? This string is added either by an HTML form with a GET method or by an HTML anchor This string is encoded in the standard URL format – spaces are replaced by “+” and special characters are encoded with %xx (hex value) for example: “ur/ a%&”  “ur%2F+a%25%26”  Meta-variables passed as environment variables

CGI CGI Request Some variables are set for every request, some don’t HTTP_* variables The web server may choose to pass some of the headers it received to the script  Meta-variables passed as environment variables

CGI CGI Request Some variables are set for every request, some don’t HTTP_* variables The web server may choose to pass some of the headers it received to the script Each such header is passed through an environment variable which name is composed in the following way: starts with “HTTP_” and then the HTTP header name, converted to upper case with occurrences of “-” replaced with “_” for example: HTTP_USER_AGENT HTTP_ACCEPT  Meta-variables passed as environment variables

CGI CGI Request The request data (for methods PUT and POST) is passed in stdin  Message body

CGI CGI Request The request data (for methods PUT and POST) is passed in stdin The script should expect to read data from stdin only if the variable CONTENT_LENGTH is not NULL; do not expect end- of-file after reading CONTENT_LENGTH bytes CONTENT_TYPE should be supplied as well  Message body

CGI CGI vs. NPH Response

CGI CGI vs. NPH Response These are scripts to which the server passes all responsibility for response processing The script’s output is sent to the client unmodified  NPH (non-parsed header) Response

CGI CGI vs. NPH Response These are scripts to which the server passes all responsibility for response processing The script’s output is sent to the client unmodified  NPH (non-parsed header) Response The response generated by the client is handled by the web server before being sent to the client Some special action by the web server might be required  CGI Response

CGI CGI Response The response has a message-header and a message-body, separated by a blank line (just like HTTP) The message-header contains one or more header fields The body may be NULL  General structure

CGI CGI Response The response has a message-header and a message-body, separated by a blank line (just like HTTP) The message-header contains one or more header fields The body may be NULL  General structure CGI; Extension; Protocol  Three different types of a response header

CGI CGI Response The response has a message-header and a message-body, separated by a blank line (just like HTTP) The message-header contains one or more header fields The body may be NULL  General structure CGI; Extension; Protocol Interpreted by the server; At least one CGI header must be present  Three different types of a response header

CGI CGI Response The response has a message-header and a message-body, separated by a blank line (just like HTTP) The message-header contains one or more header fields The body may be NULL  General structure CGI; Extension; Protocol Included in the response returned to the client  Three different types of a response header

CGI CGI Response Content-Type; Location; Status  CGI headers

CGI CGI Response Content-Type; Location; Status The content type of the message body (if exists) Syntax:Content-Type: Example:Content-Type: text/html  CGI headers

CGI CGI Response Content-Type; Location; Status This is used to specify to the server that the script is returning a reference to a document rather than an actual document Syntax:Location: URI | Example:Location: Location: /images/logo.gif  CGI headers

CGI CGI Response Content-Type; Location; Status Used to indicate to the server what status code it should use in the response message Syntax:Status: Example:Status: 200  CGI headers

CGI CGI Response Content-Type; Location; Status  CGI headers  Response types Document response; Local redirect; Client redirect

CGI CGI Response Content-Type; Location; Status  CGI headers  Response types Document response; Local redirect; Client redirect The CGI script returns a document to the user The script MUST include a Content-Type header field The script might return a Status header; if omitted, the web server assumes 200 OK

CGI CGI Response Content-Type; Location; Status  CGI headers  Response types Document response; Local redirect; Client redirect A local redirection is indicated to the web server by providing a Location header with local URL The server MUST generate the response that it would have produced in response to a request containing the local URL The script MUST NOT return any other header fields or a message-body

CGI CGI Response Content-Type; Location; Status  CGI headers  Response types Document response; Local redirect; Client redirect A client redirection is indicated to the web server by providing a Location header with absolute URL The server MUST generate a 302 Found HTTP response The script MUST not provide any other header fields, except for server-defined Extension headers

CGI CGI Response The script might generate a data attachment The server MUST read all the data provided by the script, until the script sends the end-of-file symbol  Message body

CGI CGI summary  A web server is only a pipe between user-agents  and content – it does not generate content  Works well with static content, but what about  dynamic content?  A web server needs to delegate content generation  to third party applications  Common Gateway Interface is a standard protocol  which defines how to delegate content generation  from a web server to a console application

 (e.g. search query) is passed to the command  CGI defines how information about the request CGI CGI summary The web server sets the environment variables with proper information If there is additional content (e.g. a PUT method), then it is passed using stdin  CGI sets rules for the CGI script output and how The response is written to stdout There are two types of response: NPH and CGI  it needs to be handled by the web server

 CGI scripts generate content based on data CGI Input for CGI scripts

 It might be meta-data, such as user-agent or user’s  CGI scripts generate content based on data CGI Input for CGI scripts  IP address; no user interaction required

 It might be meta-data, such as user-agent or user’s  CGI scripts generate content based on data CGI Input for CGI scripts  It is possible to have user interaction which yields  user generated data  IP address; no user interaction required

 It might be meta-data, such as user-agent or user’s  CGI scripts generate content based on data CGI Input for CGI scripts  It is possible to have user interaction which yields  user generated data  IP address; no user interaction required  HTML forms – a convenient way to generate user  input For example, shipping information or credit card details

 A form is created by using the element CGI HTML forms

 A form is created by using the element  A form is an area that contains form controls CGI HTML forms Form controls are elements that allow the user to enter information (e.g. text fields, drop-down menus, radio buttons, checkboxes, …)

 A form is created by using the element  A form is an area that contains form controls CGI HTML forms Form controls are elements that allow the user to enter information (e.g. text fields, drop-down menus, radio buttons, checkboxes, …)  Users set the values of form controls and submit Control modification is achieved though entering text, selecting menu items, etc…

 A form is created by using the element  A form is an area that contains form controls CGI HTML forms Form controls are elements that allow the user to enter information (e.g. text fields, drop-down menus, radio buttons, checkboxes, …)  Users set the values of form controls and submit Control modification is achieved though entering text, selecting menu items, etc… Then, the form is submitted to an agent (e.g. a web server) for processing

 It is a block-level element  A form is an area that contains form controls CGI The element It contains: normal content, markup, controls, and labels

HTML forms  Example (html) Username: Skip intro The element

HTML forms  Example (browser) The element

 It is a block-level element  A form is an area that contains form controls CGI The element It contains: normal content, markup, controls, and labels  The layout of the form depends on its contents

 It is a block-level element  A form is an area that contains form controls CGI The element It contains: normal content, markup, controls, and labels  The layout of the form depends on its contents  Two important attributes actionSpecifies the resource URI which is used to process the form data

 It is a block-level element  A form is an area that contains form controls CGI The element It contains: normal content, markup, controls, and labels  The layout of the form depends on its contents  Two important attributes actionSpecifies the resource URI which is used to process the form data method Specifies which HTTP method will be used to submit the form data

HTML forms  Example (html) Username: Skip intro The element

 Users interact with forms through named controls CGI Form controls Each control has a control name

 Users interact with forms through named controls CGI Form controls Each control has a control name Each control has an initial value and a current value (strings); at first the current value is set to the initial value and is then modified through user interaction If a form is reset, the current value of each control becomes the initial value again

HTML forms  Example (html) Username: Skip intro The element

 Users interact with forms through named controls CGI Form controls Each control has a control name Each control has an initial value and a current value (strings); at first the current value is set to the initial value and is then modified through user interaction If a form is reset, the current value of each control becomes the initial value again Control types: buttons, checkboxes, radio buttons, menus, text input, files select, hidden controls

 On submit, the form data is processed in steps CGI Form submission 1.Identify successful controls 2.Build a form data set 3.Encode the form data set 4.Submit the encoded form data set

 On submit, the form data is processed in steps CGI Form submission 1.Identify successful controls 2.Build a form data set 3.Encode the form data set 4.Submit the encoded form data set A successful control is valid for submission It must have a control name and a current value It cannot be disabled

 On submit, the form data is processed in steps CGI Form submission 1.Identify successful controls 2.Build a form data set 3.Encode the form data set 4.Submit the encoded form data set A data set is a sequence of control-name/current-value pairs Only successful controls are paired

 On submit, the form data is processed in steps CGI Form submission 1.Identify successful controls 2.Build a form data set 3.Encode the form data set 4.Submit the encoded form data set The data is encoded The default encoding is URL encoding

 On submit, the form data is processed in steps CGI Form submission 1.Identify successful controls 2.Build a form data set 3.Encode the form data set 4.Submit the encoded form data set The data is sent to the processing resource The resource is identified by the action attribute The method used is identified by the method attribute

 If method=“GET” CGI Form submission The user agent constructs a URI by taking the value of action, appending a “?” to it, and then appending the form data set The user agent then traverses the link to this URI. In this scenario, form data are restricted to ASCII codes

 If method=“GET” CGI Form submission The user agent constructs a URI by taking the value of action, appending a “?” to it, and then appending the form data set The user agent then traverses the link to this URI. In this scenario, form data are restricted to ASCII codes  If method=“POST” Instead of appending the encoded form data set to the URI, it is sent as the body of the message Content-Length is set to the length of the data set, and Content-Type is set to application/x-www-form-urlencoded

 A form is created by using the element  A form is an area that contains form controls CGI HTML forms summary Form controls are elements that allow the user to enter information (e.g. text fields, drop-down menus, radio buttons, checkboxes, …)  Users set the values of form controls and submit Control modification is achieved though entering text, selecting menu items, etc… Then, the form is submitted to an agent (e.g. a web server) for processing