var, var_qs, var_post — get the value of a form variable.
The var command retrieves information about GET or POST variables sent to the script via client request. It treats both GET and POST variables the same, regardless of their origin. Note that there are two additional forms of var: var_qs and var_post. These two restrict the retrieval of information to parameters arriving via the querystring (?foo=bar&bee=bop) or POSTing, respectively.
varname
? ??default?
?varname
as a string (even if there are multiple values). If
the variable doesn't exist as a GET or POST
variable, the
?default?
value is returned, otherwise "" - an empty string -
is returned.
varname
?varname
as a list,
one list element per reference. Radiobuttons or multiple
selection listboxes are suited widgets which may
return list data.
varname
?varname
exists, 0 if it doesn't.