public static function getFormValue($name, $default='')
    {
        $val = filter_input(INPUT_GET, $name, FILTER_CALLBACK, array('options'=>array('COREPOS\\common\\FormLib', 'filterCallback')));
        if ($val === null) {
            $val = filter_input(INPUT_POST, $name, FILTER_CALLBACK, array('options'=>array('COREPOS\\common\\FormLib', 'filterCallback')));
        }
        if ($val === null) {
            $val = $default;
        }

        return $val;
    }
public static function getFormValue($name, $default='')
    {
        $val = filter_input(INPUT_GET, $name, FILTER_CALLBACK, array('options'=>array('COREPOS\\common\\FormLib', 'filterCallback')));
        if ($val === null) {
            $val = filter_input(INPUT_POST, $name, FILTER_CALLBACK, array('options'=>array('COREPOS\\common\\FormLib', 'filterCallback')));
        }
        if ($val === null) {
            $val = $default;
        }

        return $val;
    }
public static function getFormValue ( $ name , $ default = '' ) { $ val = filter_input ( INPUT_GET , $ name , FILTER_CALLBACK , array ( 'options' => array ( 'COREPOS\\common\\FormLib' , 'filterCallback' ) ) ) ; if ( $ val === null ) { $ val = filter_input ( INPUT_POST , $ name , FILTER_CALLBACK , array ( 'options' => array ( 'COREPOS\\common\\FormLib' , 'filterCallback' ) ) ) ; } if ( $ val === null ) { $ val = $ default ; } return $ val ; }
Safely fetch a form value
@param $name the field name
@param $default default value if the form value doesn't exist
@return The form value, if available, otherwise the default.
Safely fetch a form value