battles/classes/input.php

23 lines
515 B
PHP

<?php
/**
* Copyright (c) 2018.
* Author: Igor Barkov <lopar.4ever@gmail.com>
* Project name: Battles-Game
*/
class input
{
public static function 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 = trim(filter_input(INPUT_POST,$name));
if (isset($var) AND !empty($var))
return $var;
else return null;
}
}