}
if (!empty($pageErrors)) {
    $_SESSION["postVars"] = $_POST;
    $_SESSION["pageErrors"] = $pageErrors;
    header("Location: ../admin/member_fields_new_form.php");
    exit;
}
#**************************************************************************
#*  Insert new domain table row
#**************************************************************************
$mf = new Mf();
$mf->setCode($_POST["code"]);
$mf->setData($_POST["data"]);
$mfQ = new MfQuery();
$mfQ->connect();
$mfQ->insert("member_fields", $mf);
$mfQ->close();
#**************************************************************************
#*  Destroy form values and errors
#**************************************************************************
unset($_SESSION["postVars"]);
unset($_SESSION["pageErrors"]);
#**************************************************************************
#*  Show success page
#**************************************************************************
require_once "../shared/header.php";
echo $loc->getText("Member field, %data%, has been added.", array('data' => $mf->getData()));
?>
<br><br>
<a href="../admin/member_fields_list.php"><?php 
echo $loc->getText("return to member fields list");