We want to pass input parameters and upload a file from a web browser to an f77 fortran program on an Apache web server, but were unable to find much usefull information about doing so. Our goal is to use no libraries, no Perl, and nothing beyond standard f77 just as it comes with FreeBSD. There are some limitations due to the lack of generality in f77 I/O, but it does do what we need quite straightforwardly and in only a few lines of code. It is also quite secure - there are no buffer overflows possible.
Here is an example of a page asking for two numeric values,passing them to a fortran program which writes an HTML response: