|
||||
3. HOW DO FORMS GET PROCESSED?To help understand EiffelWeb it is useful to have a general picture of the tasks involved in processing a form received through the World-Wide Web. When a visitor clicks on the submit button of an HTML form, the visitor's Web browser sends the contents of text fields, selected buttons and items to the server. In turn, the server transmits these data to the CGI script associated with the form. The transfer can be done via two distinct methods:
With either method, all the fields are concatenated into a unique string which has the following structure: field1=value1&field2=value2&... Space characters are converted to `+' and any special character is replaced by its hexadecimal code. Execution of the CGI script also sets a number of environment variables, defining: the method, GET POST, with which the script was called (REQUEST_METHOD); the length of the data (CONTENT_LENGTH); the name of the server (SERVER_NAME); and others. A CGI script written in an ordinary scripting language will typically perform the following tasks in response to a visitor submitting a form:
Table of contents | Next chapter
|