Form Preliminaries

 <  Day Day Up  >  


Creating forms is easy. Just add a <form> tag and associated tags for the various needed form fields to the document. You'll learn more about that in the next section, but first, let's consider how the content of a form is processed once the user submits the information. The answer isn't that complicated if we start from the big picture. After a form is filled in, the specified data is associated with various form field names and sent somewhere (as specified by a URL). Generally, the data is sent to a program on a remote Web server that parses the submitted information and acts upon it. Often, Common Gateway Interface (CGI) programs handle the incoming form-submitted data. However, it is also possible such form handling programs can be written in server-side scripting solutions such as ASP, ColdFusion or PHP, or even complex server modules such as ISAPI programs. Regardless of the technology used, some server-hosted program will receive the data, parse it, use the data, and then respond. A basic overview of how the relationship works is shown in Figure 12-1.

click to expand
Figure 12-1: Form interaction interview

The point here isn't to get into the complications of how to make a server-side program handle form-submitted data, just to understand that the form itself is only part of the equation. There still must be some way to make the form do something, but this might not be your responsibility. It is usually a good idea for team members to focus individually on certain specific aspects of a Web site. For example, does the person who creates the IRS tax form know how the program that calculates things works? Why should you worry about how the server-side program or CGI for the database query form you created is written? You shouldn't, yet this division of labor far too often is missing in Web projects. The people who build the back end of the Web site that the form interacts with probably aren't the best ones to code the form. Conversely, the person who codes the form isn't necessarily always the best person to write the back-end program. Think about how the form works in the grand scheme of things, but worry most about making your end of the site work. Yet if you do want to delve into server-side programming, readers should take a look at the next chapter, which discusses server programming in more depth. For now, we'll focus solely on making the form work in the browser.



 <  Day Day Up  >  


HTML & XHTML
HTML & XHTML: The Complete Reference (Osborne Complete Reference Series)
ISBN: 007222942X
EAN: 2147483647
Year: 2003
Pages: 252
Authors: Thomas Powell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net