<getvar [NOMSG] $var>
getvar function returns the values of the (single)
variable named by
getvar. It can be used in the rare
situations where the name of a variable cannot be determined until run
$var syntax cannot be used because the
name dynamically changes.
NOMSG is given, it will not issue a putmsg if the given name
is invalid and not found. This flag was added in Texis version 7.
getvar function returns the values of the (single) named
<FORM METHOD=post ACTION="$url/test.html">
First name: <INPUT NAME=First VALUE="$First">
Last name: <INPUT NAME=Last VALUE="$Last">
... City, State, etc. ...
<varinfo LIST CGI>
<$vars = $ret>
<rex "[^\alnum\space]+" $ret>
<IF $ret neq "">
Illegal character in $vars field.
In this example, a form with many text fields is submitted. Each
field must be checked for illegal (non-alphanumeric) characters.
Rather than laboriously call a function multiple times with hard-coded
$Street, etc., the
list of form variables is dynamically obtained with
and each form variable is checked with
getvar function was added May 7 1997.
Where possible, it is more efficient to refer to variables directly
by name than via
Non-CGI variables that are not explicitly used in the script
somewhere with a
$-sign, e.g. dynamically made-up variable
names, cannot be used.