G Web Server Examples

CGI Call with Multiple Parameters (GET)

When you need to pass multiple parameters to a CGI application, you append them to the CGI's URL as a list of ampersand (&) separated name=value pairs. Again, parameter names and values must be encoded according to HTTP rules.

The following links call the CGI /cgi-bin/examples/cgi_mlt.vi which simply generates an HTML document with the contents of the parameter list.

/cgi-bin/examples/get_mlt.vi
This call does not contain query information.

/cgi-bin/examples/get_mlt.vi?count=46
This call has a query string that contains a single parameter count with the value 46.

/cgi-bin/examples/get_mlt.vi?name=John%20Doe
This call has a query string that contains a single parameter name with the value John Doe.

/cgi-bin/examples/get_mlt.vi?name=John%20Doe&age=23
This call has a query string that contains two parameters name and age with the values John Doe and 23, respectively.


© National Instruments