TrackerDB CGI Tutorial


CGI programs can be used to retrieve data from the TrackerDB and display it in the client's web browser. Typically the CGI program will:

  1. Print the CGI headers and start the html document.
  2. Read in and parse some input parameters from a html form.
  3. Create a temporary sql query file. The input parameters read in from the form can be used to determine the contents of the query file. For instance, a module serial number entered in a html form can be passed to the CGI program and then a sql query can be written for that specific module. CGI programs should always check that the input format is expected. See the CGI Security FAQ.
  4. Query the TrackerDB and store the data.
  5. Format the results.
  6. Display the results.

Here are some simple examples:

CGI Code (Perl) HTML Form Query CGI Output
query1 N/A oa.sql query1.cgi
query2 N/A N/A query2.cgi
query3 example_form_source.html N/A query3.cgi