A webform on a web page allows a user to enter data that is, typically, sent to a server for processing and to mimic the usage of paper forms. A web page or webpage is a resource of information that is suitable for the World Wide Web and can be accessed through a Web browser. A server is a Computer dedicated to providing one or more services over a computer network typically through a request-response routine A form is a Document with spaces ( fields in which to write or select for a series of documents with similar contents Forms can be used to submit data to save on a server (e. g. , ordering a product) or can be used to retrieve data (e. g. , searching on a search engine).
Contents |
A form in XHTML or HTML is by far the most common way to use a form online. The Extensible Hypertext Markup Language, or XHTML, is a HTML, an initialism of HyperText Markup Language, is the predominant Markup language for Web pages It provides a means to describe the structure
The following elements can make up the user-inputting portion of a form:
The sample image on the right shows all of these elements:
These basic elements provide most possible graphical user interface (GUI) elements, but not all. In Computing, a button (sometimes known as a command button or Push button) is a widget that provides A drop-down list is a User interface control GUI element similar to a List box which allows the user to choose one value from a list A text box, text field or text entry box is a common element of Graphical user interface of computer programs as well as the corresponding type A radio button or option button is a type of Graphical user interface widget that allows the user to choose one of a predefined set of options A drop-down list is a User interface control GUI element similar to a List box which allows the user to choose one value from a list In Computing, a check box ( checkbox, tickbox, or tick box) is a Graphical user interface In Computing, a button (sometimes known as a command button or Push button) is a widget that provides For example, there are no equivalents to a combutcon, combo box, balloon help, tree view, or grid view. A combo box is a commonly-used GUI widget. It is a combination of a Drop-down list or List box and a single-line textbox, allowing Balloon help was a help system introduced by Apple Computer in their 1991 release of System 7 A tree view or an outline view is a Graphical user interface element ( widget) that presents a hierarchical view of information A grid view or a datagrid is a Graphical user interface element ( widget) that presents a tabular view of data A grid view, however, can be mimicked by using a standard HTML table with each cell containing a text input element. In Computing, an HTML element indicates structure in an HTML document and a way of hierarchically arranging content A tree view could also be mimicked through nested tables or, more semantically appropriately, nested lists. HTML, an initialism of HyperText Markup Language, is the predominant Markup language for Web pages It provides a means to describe the structure In Computing, an HTML element indicates structure in an HTML document and a way of hierarchically arranging content Many of these are available through JavaScript libraries. A JavaScript library is a library of pre-written JavaScript controls which allow for easier development of JavaScript-based applications especially for AJAX
Forms can be combined with various scripting languages to allow developers to create dynamic web sites. "Scripting" redirects here For other uses see Script. A software developer is a person or organization concerned with facets of the software development process wider than design and coding a somewhat broader scope of A website (alternatively web site or Web site, a back-construction from the Proper noun World Wide Web) is a collection of Web pages This includes both client-side and/or server-side languages.
The de facto standard client-side scripting language for web sites is JavaScript. Standardization (or standardisation) is the process of developing and agreeing upon technical standards. JavaScript is a Scripting language most often used for Client-side web development Utilizing JavaScript on the Document Object Model (DOM) leads to the method of Dynamic HTML that allows dynamic creation and modification of a web page within the browser. The Document Object Model ( DOM) is a platform- and language -independent standard Object model for representing HTML or XML and related Dynamic HTML, or DHTML, is a collection of technologies used together to create interactive and animated Web sites by using a combination of a static Markup
While client-side languages used in conjunction with forms are limited, they often can serve to do pre-validation of the form data and/or to prepare the form data to send to a server-side program.
Server-side programs can do a vast assortment of tasks to create dynamic web sites — from authenticating a login through, for example, Lightweight Directory Access Protocol to retrieving and storing data in a database to spell checking to sending e-mail — quite unlike client-side programs. Authentication (from Greek αυθεντικός real or genuine from authentes author is the act of establishing or confirming something (or someone as In Computer security, login (logging or signing in is the process by which individual Access to a Computer system is controlled by identification of the The Lightweight Directory Access Protocol, or LDAP (ˈɛl dæp is an Application protocol for querying and modifying Directory services running over A Computer Database is a structured collection of records or data that is stored in a computer system In Computing, a spell checker is an applications program that flags words in a document that may not be spelled correctly Electronic mail, often abbreviated to e-mail, email, or originally eMail, is a Store-and-forward method of writing sending receiving Most server-side program requests must pass through the web server's Common Gateway Interface to execute the program to actually perform the tasks. The term web server can mean one of two things A Computer program that is responsible for accepting HTTP requests from web clients which are The Common Gateway Interface ( CGI) is a standard protocol for interfacing external Application software with an information server Execution in computer and Software engineering is the process by which a Computer or Virtual computer carries out the instructions
The advantage of server-side over client-side is the concentration of functionality onto one computer (the server) instead of relying on each web browser implementing all of the various functions the same. A web browser is a software application which enables a user to display and interact with text images videos music games and other information typically located on a This very problem is quite evident to any developer who writes JavaScript code for multiple browsers. JavaScript is a Scripting language most often used for Client-side web development
Scripting languages are the most common server-side programs used for web sites, but it is also possible to run compiled programs. "Scripting" redirects here For other uses see Script.
Some of the scripting languages commonly used:
Some of the compiling languages commonly used:
PHP is one very common language used for server-side languages and is one of the few languages created specifically for server-side programs. PHP is a computer Scripting language. Originally designed for producing Dynamic web pages it has evolved to include a Command line interface capability NOTES FOR EDITORS "Perl" is not an acronym (read the "Name" section below Active Server Pages ( ASP) is Microsoft 's first server-side script engine for dynamically-generated web pages This article is about the computer programming language For the nuclear reactions see Cold fusion. JavaServer Pages ( JSP) is a Java technology that allows Software developers to dynamically generate HTML, XML or other types of documents tags please moot on the talk page first! --> In Computing, C is a general-purpose cross-platform block structured C++ (" C Plus Plus " ˌsiːˌplʌsˈplʌs is a general-purpose Programming language. PHP is a computer Scripting language. Originally designed for producing Dynamic web pages it has evolved to include a Command line interface capability
A PHP script may:
The HTML form learns where to pass the data from the action attribute of the form's HTML element. HTTP cookies, or more commonly referred to as Web cookies tracking cookies or just cookies are parcels of text sent by a server to a Web client (usually Electronic mail, often abbreviated to e-mail, email, or originally eMail, is a Store-and-forward method of writing sending receiving An e-mail attachment (or email attachment) is a Computer file which is sent along with an e-mail In Computing, an HTML element indicates structure in an HTML document and a way of hierarchically arranging content The target PHP file then retrieves the data either through POST or GET (see HTTP for more information), depending on the programmer's preference. Hypertext Transfer Protocol ( HTTP) is a Communications protocol for the transfer of information on the Internet. A programmer is someone who writes Computer software. The term computer programmer can refer to a specialist in one area of computer programming or to a generalist Here is a basic form handler PHP script that will post the form's contents, in this case "user", to the page using GET:
form. html
<html> <body> <form action="form_handler. php" method="get"> User Name: <input name="user" type="text" /> <input type="submit" /> </form> </body> </html>
form_handler. php
<html> <body> <?php /* * This will print whatever the user put into the form on the form. html page. */ $name = $_GET['user']; echo "Hello, ". $name . "!"; ?> </body> </html>
In the above script the $_GET[''] and $_POST[''] commands need to be changed, depending on what is used in the form, however $_REQUEST[''] is used for both so it is more efficient to use for form collection.
Perl is another language often used for web development. NOTES FOR EDITORS "Perl" is not an acronym (read the "Name" section below Web development is a broad term for any activity related to developing a Web site for the World Wide Web or an Intranet. Perl scripts are traditionally used as Common Gateway Interface applications (CGIs). The Common Gateway Interface ( CGI) is a standard protocol for interfacing external Application software with an information server In fact, Perl is such a common way to write CGIs that the two are often confused. CGIs may be written in other languages than Perl (compatibility with multiple languages is a design goal of the CGI protocol) and there are other ways to make Perl scripts interoperate with a web server than using CGI (such as FastCGI or Apache's mod perl). The term web server can mean one of two things A Computer program that is responsible for accepting HTTP requests from web clients which are mod_perl is an optional module for the Apache HTTP server. It embeds a Perl interpreter into the Apache server so that dynamic content produced by Perl
Perl CGIs were once a very common way to write web applications. In Software engineering, a web application or webapp is an application that is accessed via Web browser over a network such as the Internet But not being specifically designed for web development, Perl is now often viewed as less practical (both for developers and users) than specialized languages like PHP or ASP. PHP is a computer Scripting language. Originally designed for producing Dynamic web pages it has evolved to include a Command line interface capability This is especially true if Perl modules would need to be installed on the web host or if wanting to use a non-CGI environment that might require extra configurations on the web server. A Perl module is a discrete component of software for the Perl programming language Some web hosts also rely on interpreter-level sandboxing, which while possible with the Safe module, wouldn't be very practical and undoubtly break a lot of scripts considering common practices. This article is about the Computer security mechanism For the Wikipedia feature where newcomers can experiment with editing or established editors can experiment with Similar considerations might apply to other general-purpose scripting languages like Python or Ruby. Python is a general-purpose High-level programming language. Its design philosophy emphasizes programmer productivity and code readability Ruby is a dynamic, reflective, general purpose Object-oriented programming language that combines syntax inspired by Perl with Smalltalk For these reasons, a lot of cheap web hosts nowadays effectively only support PHP and web developers often seek compatibility with them.
A modern Perl 5 CGI using the standard CGI module with a form similar to the one above might look like:
form_handler. pl
#!/usr/bin/perl use CGI qw(:standard); $user = param('user'); print header; print html( body( p("Hello, $user!"), ), );
Among the simplest and most commonly needed types of server-side script is that which simply emails the contents of a submitted form. This kind of script is frequently exploited by spammers, however, and many of the most popular form-to-email scripts in use are vulnernable to be hijacked for spamming purposes. Spamming is the abuse of electronic messaging systems to indiscriminately send unsolicited bulk messages One of the most popular scripts of this type was "FormMail.pl" made by Matt's Script Archive. Today, no version of this still frequently used script is considered secure.
To avoid the confusion and difficulty of installing and using scripts, webmasters often use a free forms processing service to get their forms working.