battles/classes/input.php

23 lines
517 B
PHP
Raw Normal View History

2018-03-30 19:28:22 +00:00
<?php
/**
* Copyright (c) 2018.
* Author: Igor Barkov <lopar.4ever@gmail.com>
* Project name: Battles-Game
*/
class input
{
public static function get($name) {
$var = rtrim(filter_input(INPUT_GET,$name));
if (isset($var) AND !empty($var))
return $var;
else return null;
2018-03-30 19:28:22 +00:00
}
public static function post($name) {
$var = rtrim(filter_input(INPUT_POST,$name));
if (isset($var) AND !empty($var))
return $var;
else return null;
2018-03-30 19:28:22 +00:00
}
}