From your
Web browser, you can use an HTML form to invoke htmSQL. The HTML form
must use the URL for your Web page as the value of the
ACTION attribute of the HTML
FORM element. You can also use the optional
METHOD attribute to specify the CGI method to use for sending form data:
<form action="http://yourserver/dir/executable_file/input-file" [method=get|post]>
-
yourserver is your Web server host
name (and port, if required).
-
dir is the path of the Web server
CGI program directory that contains htmSQL.
-
executable_file is the htmSQL program
name. For UNIX and
z/OS, the program name is htmSQL. For Windows,
the program name is htmSQL.exe.
-
input-file is your input file as
a relative pathname under the Web server's root directory (which can
include a Web server alias).
-
GET and
POST are the two CGI methods for sending form data.
Your Web browser sends
the form data to the Web server as part of the URL. The Web server
passes the form data to htmSQL through the environment variable QUERY_STRING.
Your Web browser sends
the form data to the Web server as part of the body of the HTTP request.
htmSQL reads the form data from stdin.
On the form, use HTML
INPUT elements to collect variable values. For the
NAME attribute of the
INPUT element, use the same variable names that you use for your variable
references. When the form is submitted, the Web browser automatically
generates the following query string from the form input and appends
it to the URL that is specified by the
ACTION attribute (for the
GET method) or sends
it in the body of the HTTP request (for the
POST method):
var1=value1&var2=value2&...varN=valueN
Note: Some Web servers can be
configured to recognize an input file by its file extension and to automatically
call the appropriate CGI program to process the file. If your Web
server can be configured this way, you can omit the path to htmSQL
when you specify the URL (that is, you can omit the
dir and
executable_file values). Consult your Web server documentation for details about
whether and how your server can be so configured.