#include main() { char *input; printf("Content-type: text/html\n\n"); if (scanf("%s", input)!=0) /* you can now generate the output HTML */ { /* parse input into variables */ printf("< html> "); printf("I got: %s ",input); printf("< /html> "); return 1;} else /* there is no input so generate the form */ { printf("< html> "); printf("< form method=""post"" action=""this file's name""> "); printf("< input name=""input""> "); printf("< input type=""submit""> "); printf("< /form> "); printf("< /html> "); return 1;} }