Sams Teach Yourself Internet and Web Basics All in One
A form is a Web page (or a part of a Web page) that collects information from your visitors by prompting them to select options from lists, check boxes, and other such form fields (see Figure 28.1). When done supplying information, the visitor clicks a Submit button to send the data to the server to be processed . (An optional Reset button also is often provided; this button clears all the forms entries a visitor has made so that he or she can start over, if necessary.) Figure 28.1. Forms use fields to collect information from visitors.
Creating the part of a form you see is easy ”in fact, HTML Assistant Pro 2000 can even create one for you, in several different ways. But the part you see is only half the form; the other half consists of various behind-the-scenes programming for collecting and processing the data visitors enter and storing it in a form that's useful to you. That processing can happen in several different ways; for example, if you use Microsoft FrontPage as your authoring tool and if the Web server on which you publish the page containing the form is equipped with the Microsoft software FrontPage Extensions, you can configure nearly all aspects of processing from within FrontPage, and you will need no other programming to process your form. But if you do not use FrontPage and the extensions, a short program called a script must be custom-written to process your form, and that script must be properly set up on the Web server. The script can be programmed in any of several different programming languages (CGI scripts, created in the Perl programming language, are the most common). Such programming generally exceeds the capabilities and ambitions of beginning Web authors ”although, if you're so inclined, plenty of good books can teach you. For beginners , I think that the best approach is this: You worry about what appears onscreen, and you let someone else worry about the scripting. If you will publish on your Internet provider's Web server, you can simply define the form's onscreen appearance (as you learn to do in this chapter) and then talk with your Internet provider about how you want the data handled. In all likelihood , the Internet provider will have a script already written that can be modified to suit your particular needs. |