Убираем пробелы в запросах не только в конце, а с обоих сторон

This commit is contained in:
Igor Barkov [iwork] 2018-12-11 12:57:31 +02:00
parent cdd0028ecb
commit 8aa018a805

View File

@ -8,14 +8,14 @@
class input
{
public static function get($name) {
$var = rtrim(filter_input(INPUT_GET,$name));
$var = trim(filter_input(INPUT_GET,$name));
if (isset($var) AND !empty($var))
return $var;
else return null;
}
public static function post($name) {
$var = rtrim(filter_input(INPUT_POST,$name));
$var = trim(filter_input(INPUT_POST,$name));
if (isset($var) AND !empty($var))
return $var;
else return null;