Example CGI Programs using LibCGI

1. List of server variables - view the source
This prints a list of server variables and their values. Server variables are great for determining who the client is, what browser they're using, etc.

2. Using the GET method - view the source
This gives you an example of how to manipulate data from the QUERY_STRING (the stuff that comes after the '?' in the URL).

3. Using the POST method - view the source
This code looks almost identical to example 2, but instead of using the QUERY_STRING server variable, it uses standard input (STDIN). POST is most often used for file uploads, and other data transfer that moves a large amount of data.

4. Using Multipart Forms - view the source
This program generates a file upload form, then displays the file in the browser. This is a great example of using the HTML markup functions, since it uses them to generate the form.

5. Look at the code for the source viewer
The source code viewer is actually a Euphoria CGI itself. I can't link to the .ex files directly, otherwise the browser will bring up a Open/Save dialog. So instead, I pass the filename using the QUERY_STRING, and then print the file to the browser.