echo "<div class=\"content-small\">for " . $organisation->getTitle() . " &gt; " . ucwords($group) . " &gt; " . ucwords($opts["associated_role"]) . "</div><br />";
                    echo editMetaDataTable_Category($organisation_id, $group, $role, null, $category);
                } else {
                    //if there were any errors, return a 500 and display errors
                    header("HTTP/1.0 500 Internal Error");
                    echo display_status_messages(false);
                }
                break;
            case 'new_value':
                $cat_id = filter_input(INPUT_POST, "type", FILTER_SANITIZE_NUMBER_INT);
                $proxy_id = filter_input(INPUT_POST, "proxy_id", FILTER_SANITIZE_NUMBER_INT);
                $type = MetaDataType::get($cat_id);
                if ($type) {
                    $user = User::get($proxy_id);
                    $org_id = $user->getOrganisationId();
                    $group = $user->getGroup();
                    $role = $user->getRole();
                    $types = MetaDataTypes::get($org_id, $group, $role, $proxy_id);
                    $value_id = MetaDataValue::create($cat_id, $proxy_id);
                    $value = MetaDataValue::get($value_id);
                    $descendant_type_sets = getDescendentTypesArray($types, $type);
                    header("Content-Type: application/xml");
                    echo editMetaDataRow($value, $type, $descendant_type_sets);
                } else {
                    header("HTTP/1.0 500 Internal Error");
                    echo display_error("Invalid type. Please try again.");
                }
        }
    }
    exit;
}
                }
                if (!has_error()) {
                    echo editMetaDataTable_User($user);
                } else {
                    //if there were any errors, return a 500 and display errors
                    header("HTTP/1.0 500 Internal Error");
                    echo display_status_messages(false);
                }
                break;
            case 'new_value':
                $cat_id = filter_input(INPUT_POST, "type", FILTER_SANITIZE_NUMBER_INT);
                $type = MetaDataType::get($cat_id);
                if ($type) {
                    $user = User::get($PROXY_ID);
                    $org_id = $user->getOrganisationId();
                    $group = $user->getGroup();
                    $role = $user->getRole();
                    $types = MetaDataTypes::get($org_id, $group, $role, $PROXY_ID);
                    $value_id = MetaDataValue::create($cat_id, $PROXY_ID);
                    $value = MetaDataValue::get($value_id);
                    $descendant_type_sets = getDescendentTypesArray($types, $type);
                    header("Content-Type: application/xml");
                    echo editMetaDataRow($value, $type, $descendant_type_sets);
                } else {
                    header("HTTP/1.0 500 Internal Error");
                    echo display_error("Invalid type. Please try again.");
                }
        }
    }
    exit;
}