If you create forms, sooner or later you’ll need to create the server-side application that processes them. Don’t panic. There is nothing magic about server-side programming, nor is it overly difficult. With a little practice and some perseverance, you’ll be cranking out forms applications.
The most important advice we can give about forms programming is easy to remember: copy others’ work. Writing a forms application from scratch is fairly hard; copying a functioning forms application and modifying it to support your form is far easier.
Fortunately, server vendors know this, and they usually supply sample forms applications with their server. Rummage about for a directory named cgi-src, and you should discover a number of useful examples you can easily copy and reuse.
We can’t hope to replicate all the useful stuff that came with your server or provide a complete treatise on forms programming. What we can do is offer a simple example of both GET and POST applications, giving you a feel for the work involved and hopefully getting you moving you in the right direction.
Before we begin, keep in mind that not all servers invoke these applications in the same manner. Our examples cover the broad class of servers derived from the original NCSA HTTP server. They also should work with the Netscape Communications family of server products and the public-domain Apache server. In all cases, consult your server documentation for complete details. You will find more detailed ...