I'm studying making a CGI program. Now I can print text what I want. But how can I get GET or POST input from CGI program? (such as query-string or post-body)
I'm studying making a CGI program. Now I can print text what I want. But how can I get GET or POST input from CGI program? (such as query-string or post-body)
The query string is accessible via the environmental variable called REQUEST_URI. If the client sent a POST request, then the contents will be available through the standard input.
See the Apache tutorial for a brief info (this is where the above sentences have been copied from).
By the way, most scripting language provides some kind of CGI support (for example, perl's CGI documentation is here), so the one you use surely has methods for extracting data from the request as well.