Убираем пробелы в запросах не только в конце, а с обоих сторон
This commit is contained in:
parent
cdd0028ecb
commit
8aa018a805
@ -8,14 +8,14 @@
|
|||||||
class input
|
class input
|
||||||
{
|
{
|
||||||
public static function get($name) {
|
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))
|
if (isset($var) AND !empty($var))
|
||||||
return $var;
|
return $var;
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function post($name) {
|
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))
|
if (isset($var) AND !empty($var))
|
||||||
return $var;
|
return $var;
|
||||||
else return null;
|
else return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user