help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Procedures and functions] Reference for unit 'pwumain' (#powtils_main)

IsCgiVar

Declaration

Source position: pwumain.pas line 72

function IsCgiVar(

  const name: String

):Boolean;

Notes

Checks whether or not a CGI (url, post, get) variable exists.

Example

If you have a web form with a widget named "edit1" on it, you can check to see if a CGI program has recieved a POST or a GET from this form that contained the "edit1" widget.
begin
 if IsCgiVar('edit1') then 
   webwrite('A widget with name "edit1" was on a form that posted to this program!');
end.
If you visit a URL such as http://url.com/cgi-bin/prog?var=hello
begin
 if IsCgiVar('var') then 
   webwrite('var was found in url');
end.
As you can see, a variable in a URL or an edit widget are both detected with IsCgiVar.

Related

The IsVar (IsWebVar) function is similar, but also checks session and cookie vars.

See also

GetCgiVar, GetVar, IsSess, IsCookie, IsVar





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505