Sie sind auf Seite 1von 9

Forms

Information
Primary Purposes of the Internet Dispersal of information Collection of information The bi-directional transfer of information cannot occur with HTML alone!

Server Side Processing

Server side processing consists of

INPUTS: Items passed to the server for processing. OUTPUT: The results of the server processes: a web page
Amazon: Type in your credit card and their server takes that information and bills your credit card company. Server-side image maps. Those utilized on mapping web sites are generally server-side because the input is simply two coordinates. The map is redrawn by the server having those coordinates as the center. Simple CGI or ASP application. Take your name and say hello.

Examples:

HTML Forms

Any time you see a web site where you are prompted to enter information
Input box Checklist Radio Buttons Select list, Submit button

This info is contained within your browser on a form.

Variables

Variables are sent to the server in one of two methods

Get: Fields are sent in the URL following a question mark (?) and separated by ampersands (&)

http://yo.com/post.aspx?name=Ned&id=42

Post: Fields are sent within HTTP headers.

HTTP Posting Methods

Get
Aids in (but may not guarantee) bookmarking Only supports the maximum URL length for a browser, thus many fields long wont work well. Does not require the use of a form.

Post
Supports much more information transfer Hides information from user (mostly)

Posting a form without a server

You can have the users browser send an email on the users behalf to an email address within your form. This is not recommended to implement in production, but it can help you debug.

CGI: Common Gateway Interface


http://hoohoo.ncsa.uiuc.edu/cgi/intro.html The Common Gateway Interface (CGI) is a standard for interfacing external applications with information servers, such as HTTP or Web servers. A plain HTML document that the Web daemon retrieves is static, which means it exists in a constant state: a text file that doesn't change. A CGI program, on the other hand, is executed in real-time, so that it can output dynamic information.

For example, let's say that you wanted to "hook up" your Unix database to the World Wide Web, to allow people from all over the world to query it. Basically, you need to create a CGI program that the Web daemon will execute to transmit information to the database engine, and receive the results back again and display them to the client. This is an example of a gateway, and this is where CGI, currently version 1.1, got its origins.

CGI Implementations

ASP/ASP.NET: Microsoft Active Server Pages running on Microsoft Internet Information Server (IIS) JSP: Java Server Pages running on the Java Virtual Machine, likely served by Apache Tomcat. PHP: server-side HTML embedded scripting language Perl: architecturally similar to Java C: Your old fiend Shell Scripting: not recommended

Das könnte Ihnen auch gefallen