// make sure we don't choose a product group name that has already been taken
    if (!$obj_product_group->verify_group_name()) {
        log_write("error", "process", "This product group name is already used - please choose a unique name.");
        $_SESSION["error"]["group_name-error"] = 1;
    }
    // return to input page if any errors occured
    if ($_SESSION["error"]["message"]) {
        if ($obj_product_group->id) {
            $_SESSION["error"]["form"]["product_group_view"] = "failed";
            header("Location: ../index.php?page=products/groups-view.php&id=" . $obj_product_group->id . "");
            exit(0);
        } else {
            $_SESSION["error"]["form"]["product_group_add"] = "failed";
            header("Location: ../index.php?page=products/groups-add.php");
            exit(0);
        }
    }
    /*
    	Process Data
    */
    // update product group
    $obj_product_group->action_update();
    // display updated details
    header("Location: ../index.php?page=products/groups-view.php&id=" . $obj_product_group->id);
    exit(0);
} else {
    // user does not have perms to view this page/isn't logged on
    error_render_noperms();
    header("Location: ../index.php?page=message.php");
    exit(0);
}