Before attempting to write any CGI program, however, the server must be equipped to run CGI programs. An example of a CGI program in action is a form found on many Web sites that's designed to elicit information and feedback from users. The form itself is created in HTML along with the rest of the Web page the form resides on. When someone enters data in this form, the data gets sent to the server and executes a CGI program. This program puts the data entered in the form into a specific file or location and then se nds a notification message back to the client when processing the form is successful.
Webmasters use CGI in a variety of seemingly limitless ways.
CGI can increase interactively, productivity and ease of navigation. Some sites use CGI to randomly rotate a set of ads, while other sites use CGI to create password-protected pages so only users with passwords can have access. Many search engines also implement a CGI program to search databases.