File/includes/formvars.php

Description

WebCalendar's functions to retrieve Predefined Variables

See http://www.php.net/manual/en/reserved.variables.php for a complete description and examples

  • author: Craig Knudsen <cknudsen@cknudsen.com>
  • version: $Id$
  • copyright: Craig Knudsen, <cknudsen@cknudsen.com>, http://www.k5n.us/cknudsen
  • license: GNU GPL
Functions
getGetValue (line 52)

Gets the value resulting from an HTTP GET method.

Since this function is used in more than one place, with different names, let's make it a separate 'include' file on it's own.

Note: The return value will be affected by the value of magic_quotes_gpc in the php.ini file.

If you need to enforce a specific input format (such as numeric input), then use the () function.

string getGetValue (string $name)
  • string $name: Name used in the HTML form or found in the URL
getIntValue (line 121)

Gets an integer value resulting from an HTTP GET or HTTP POST method.

Note: The return value will be affected by the value of magic_quotes_gpc in the php.ini file.

  • return: The value used in the HTML form (or URL)
  • uses: getValue()
string getIntValue (string $name, [bool $fatal = false])
  • string $name: Name used in the HTML form or found in the URL
  • bool $fatal: Is it considered a fatal error requiring execution to stop if the value retrieved does not match the format regular expression?
getPostValue (line 25)

Gets the value resulting from an HTTP POST method.

Note: The return value will be affected by the value of magic_quotes_gpc in the php.ini file.

string getPostValue (string $name)
  • string $name: Name used in the HTML form
getValue (line 84)

Gets the value resulting from either HTTP GET method or HTTP POST method.

Note: The return value will be affected by the value of magic_quotes_gpc in the php.ini file.

Note: If you need to get an integer value, you can use the getIntValue function.

string getValue (string $name, [string $format = ''], [bool $fatal = false])
  • string $name: Name used in the HTML form or found in the URL
  • string $format: A regular expression format that the input must match. If the input does not match, an empty string is returned and a warning is sent to the browser. If The $fatal parameter is true, then execution will also stop when the input does not match the format.
  • bool $fatal: Is it considered a fatal error requiring execution to stop if the value retrieved does not match the format regular expression?

Documentation generated on Thu, 10 Jun 2010 17:08:26 -0400 by phpDocumentor 1.4.3