From d30e100e2360b3c0806ea55a9a9080d5fd319761 Mon Sep 17 00:00:00 2001 From: icewing Date: Wed, 13 Feb 2008 14:07:56 +0000 Subject: Added input method git-svn-id: https://code.elgg.org/elgg/trunk@22 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/input.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 engine/lib/input.php (limited to 'engine/lib/input.php') diff --git a/engine/lib/input.php b/engine/lib/input.php new file mode 100644 index 000000000..c62539f49 --- /dev/null +++ b/engine/lib/input.php @@ -0,0 +1,31 @@ + + * @copyright Curverider Ltd 2008 + * @link http://elgg.org/ + */ + + /** + * Get some input from passed variables. + * + * @param $variable string The variable we want to return. + * @param $default mixed A default value for the variable if it is not found. + */ + function get_input($variable, $default = "") + { + + + // TODO: Some nice filtering here + + if (isset($_REQUEST[$variable])) + return trim($_REQUEST[$variable]); + + return $default; + } +?> \ No newline at end of file -- cgit v1.2.3