範例
------------------------------------INPUT.HTM
<html>
<body>
<form method=post action=./cgi-bin/input.cgi>
<input type=text name='id' size=10>
<input type=submit value='決定'><input type=reset value='重填'>
</form>
</body>
-----------------------------------------INPUT.C
#include <stdio.h>
#include <stdlib.h>
int main()
{
typedef struct {
char id[10];
int year;
} USER;
USER user;
printf("Content-type: text/html\n\n");
printf("<html>\n");
printf("%s=%d",user.id,user.year);
printf("</html>");
return(0);
}