Have you recently checked out SVN? Got to love the new input class function ![]()
They added a new function:
/**
* Fetch an item from the GET array
*
* @access public
* @param string
* @param bool
* @return string
*/
function post($index = '', $xss_clean = FALSE)
{
if ( ! isset($_GET[$index]))
{
return FALSE;
}
if ($xss_clean === TRUE)
{
if (is_array($_GET[$index]))
{
foreach($_GET[$index] as $key => $val)
{
$_GET[$index][$key] = $this->xss_clean($val);
}
}
else
{
return $this->xss_clean($_GET[$index]);
}
}
return $_GET[$index];
}
In addition to the already existing function:
/**
* Fetch an item from the POST array
*
* @access public
* @param string
* @param bool
* @return string
*/
function post($index = '', $xss_clean = FALSE)
{
if ( ! isset($_POST[$index]))
{
return FALSE;
}
if ($xss_clean === TRUE)
{
if (is_array($_POST[$index]))
{
foreach($_POST[$index] as $key => $val)
{
$_POST[$index][$key] = $this->xss_clean($val);
}
}
else
{
return $this->xss_clean($_POST[$index]);
}
}
return $_POST[$index];
}
Ofcourse I know its a small ‘bug’ but me and my colleague had a good laugh about this one
Still happy to see that they add get functionality.
