blob: c1b575e64023b0ddfa5ef2973e58c935cbd2b3f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php
/**
* Parameter input functions.
* This file contains functions for getting input from get/post variables.
*
* @package Elgg
* @subpackage Core
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Marcus Povey <marcus@dushka.co.uk>
* @copyright Curverider Ltd 2008
* @link http://elgg.org/
*/
/**
* Get some input from variables passed on the GET or POST line.
*
* @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 = "")
{
if (isset($_REQUEST[$variable])) {
$value = $_REQUEST[$variable];
return trim($_REQUEST[$variable]);
}
return $default;
}
?>
|