$OPTIMIZE ON $TYPECHECK ON $APPTYPE CGI $INCLUDE "qcgi.inc" $ESCAPECHARS ON DECLARE SUB main() DECLARE SUB PrintHeader(myTitle$ AS STRING) DECLARE SUB PrintFooter() DECLARE FUNCTION GetUserName() AS STRING DECLARE SUB PrintInfo() CREATE CGI AS QCGI InitCGI(cgiInputDefault, cgiConvertAuto) END CREATE CALL main() SUB main() CALL PrintHeader("CGI Info") PRINT "\t\t

Hello, " + GetUserName() + "

" PRINT "\t\t

Here are your environmental varibles

" CALL PrintInfo() CALL PrintFooter() END SUB SUB PrintHeader(myTitle$ AS STRING) PRINT "Content-type: text/html; charset=iso-8859-1\n\n" PRINT "" PRINT "" PRINT "\t" PRINT "\t\t" PRINT "\t\t" PRINT "\t\t\t" + myTitle$ PRINT "\t\t" PRINT "\t" PRINT "\t" END SUB SUB PrintFooter() PRINT "\t" PRINT "" PRINT END SUB FUNCTION GetUserName() AS STRING Result = CGI.GetValue("name") END FUNCTION SUB PrintInfo() PRINT "\t\t" END SUB