LJ Archive

Listing 4. Legacy Language CGI Framework

void GenerateHtmlDocument () {

char  *TextField    = GetFormStringValue("TextField");

int    NumericField = GetFormIntegerValue("IntegerField");

float  FloatField   = GetFormFloatValue("FloatField");

printf("<HTML><HEAD><HEAD><BODY><H3><CENTER>"

   "TextField    = [%s] <BR>"

   "NumericField = [%d] <BR>"

   "FloatField   = [%f] <BR>"

   "<CENTER><H3><BODY><HTML>\n",

   TextField, NumericField, FloatField);


} /* end function GenerateHtmlDocument() */




int main (int argc, char **argv) {


   printf("Content-Type: text/html;\n\n");

   GenerateHtmlDocument();

   ReleaseFormData();


} /* end of main() function */
LJ Archive