CGI Query strings consist of sequences of NAME=VALUE groups separated by a delimiting character. The standard encoding is MIME-type application/w-www-form-urlencoded. This encoding uses & as the group separator, + to replace spaces, and any non-url-legal characters (1!#$%&+ etc etc) are converted to their %xx hex equivalents. This data: Foo=bar Net message=Hello! Name=Bob Smith Would translate to this: Foo=bar&Net=&message=Hello%21&Name=Bob+Smith --- To generate a web page in CGI: print the content-type header (and any other headers you feel you need) print a blank line print out the data for the page. Doesn't even need to be an HTML page. Could be text, could be an image, could be anything, so long as the Content-Type is set properly.