Please enable JavaScript to view this site.

xcall CGIUTL, CGIOP_GETPAR, parmname, parmval, status {, string}

Opcode 2, CGIOP_GETPAR, retrieves the web form parameter by name. Typically this requires that the program was launched in CGI mode (with the -cgi or -fastcgi switch) using the POST or GET method in the HTML form action statement, in which case the parameters are passed in via the stdin channel. (Technically, the GET method passes the parameters via the QUERY_STRING environment variable, but A-Shell will copy that into its stdin buffer so that both methods act the same within CGIUTL.) Alternatively, the application can provide a source string in place of stdin; see Comments below.

Parameters

parmname (String)  [in]

name of the parameter to retrieve

parmval (String)  [out]

value of the retrieved parameter

status (Signed Num)  [out]

0 for OK, -1 if the parameter is not found, –2 if not in CGI mode.

string (String)  [in]

If string is specified it is used in place of stdin. It must be formatted in the same way that stdin would have been formatted by the CGI interface, i.e.:

name1=value1&name2=value2&...nameN=valueN"

Comments

"+" characters in the source string are interpreted as spaces, and anything of the form %xx (where xx are two hex digits) is translated to the equivalent ASCII character.)

Note that if you use the form action GET instead of POST, you can also query the variables by retrieving the definition of the environment variable QUERY_STRING (see MX_GETENV) into the string parameter.

Also note that when string is specified, you do not actually have to be in CGI mode, and thus the operation could be useful for non-CGI purposes.

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software