The Visual Basic CGI is made up of two modules each containing several sub-routines. The module cgi.bas (which is not presented for viewing) controls the actual interface and must be included in all CGI projects. The second module (in this case foxdemo.bas) is where the WWW provider writes his/her code.
foxdemo.bas contains 5 sub-routines/functions. CGI_Main handles the form request, the FoxPro call and the transmission of the results page. RejectEntry() transmits a html page to the client if the data submitted is invalid. SendParameters() presents the user with the WWW form for completion. The remaining two functions SendHeader and SendFooter are called at the start and end of each html page transmission.
Note: The functions GetSmallField() and Send() are contained in cgi.bas.