public function getFormInputs($controlName = null, $toString = TRUE)
    {
        if ($controlName) {
            if (isset($_GET[$controlName])) {
                $_POST[$controlName] = $_GET[$controlName];
            }
            if (isset($_POST[$controlName])) {
                if (is_array($_POST[$controlName]) and $toString == TRUE) {
                    $array_string = '';
                    foreach ($_POST[$controlName] as $rec) {
                        $array_string .= $rec . ",";
                    }
                    $result = substr($array_string, 0, strlen($array_string) - 1);
                } else {
                    $result = $_POST[$controlName];
                }
                if (get_magic_quotes_gpc() == 1) {
                    if (!is_array($result)) {
                        $result = stripslashes($result);
                    }
                }
                return $result;
            } else {
                if (isset($_FILES[$controlName])) {
                    $result = true;
                    return $result;
                } else {
                    return null;
                }
            }
        } else {
            return $_POST;
        }
    }
public function getFormInputs($controlName = null, $toString = TRUE)
    {
        if ($controlName) {
            if (isset($_GET[$controlName])) {
                $_POST[$controlName] = $_GET[$controlName];
            }
            if (isset($_POST[$controlName])) {
                if (is_array($_POST[$controlName]) and $toString == TRUE) {
                    $array_string = '';
                    foreach ($_POST[$controlName] as $rec) {
                        $array_string .= $rec . ",";
                    }
                    $result = substr($array_string, 0, strlen($array_string) - 1);
                } else {
                    $result = $_POST[$controlName];
                }
                if (get_magic_quotes_gpc() == 1) {
                    if (!is_array($result)) {
                        $result = stripslashes($result);
                    }
                }
                return $result;
            } else {
                if (isset($_FILES[$controlName])) {
                    $result = true;
                    return $result;
                } else {
                    return null;
                }
            }
        } else {
            return $_POST;
        }
    }
public function getFormInputs ( $ controlName = null , $ toString = TRUE ) { if ( $ controlName ) { if ( isset ( $ _GET [ $ controlName ] ) ) { $ _POST [ $ controlName ] = $ _GET [ $ controlName ] ; } if ( isset ( $ _POST [ $ controlName ] ) ) { if ( is_array ( $ _POST [ $ controlName ] ) and $ toString == TRUE ) { $ array_string = '' ; foreach ( $ _POST [ $ controlName ] as $ rec ) { $ array_string .= $ rec . "," ; } $ result = substr ( $ array_string , 0 , strlen ( $ array_string ) - 1 ) ; } else { $ result = $ _POST [ $ controlName ] ; } if ( get_magic_quotes_gpc ( ) == 1 ) { if ( ! is_array ( $ result ) ) { $ result = stripslashes ( $ result ) ; } } return $ result ; } else { if ( isset ( $ _FILES [ $ controlName ] ) ) { $ result = true ; return $ result ; } else { return null ; } } } else { return $ _POST ; } }
Get form all inputs or one input if controlName is given

@param string $controlName
@param boolean $toString - Convert array oriented form controls to string?
@return array|string
Get form all inputs or one input if controlName is given