#**************************************************************************** #* Checking for post vars. Go back to form if none found. #**************************************************************************** if (count($_POST) == 0) { header("Location: ../admin/mbr_classify_new_form.php"); exit; } #**************************************************************************** #* Validate data #**************************************************************************** $dm = new Dm(); $dm->setDescription($_POST["description"]); $_POST["description"] = $dm->getDescription(); $dm->setMaxFines($_POST["max_fines"]); $_POST["max_fines"] = $dm->getMaxFines(); if (!$dm->validateData()) { $pageErrors["description"] = $dm->getDescriptionError(); $_SESSION["postVars"] = $_POST; $_SESSION["pageErrors"] = $pageErrors; header("Location: ../admin/mbr_classify_new_form.php"); exit; } #************************************************************************** #* Insert new domain table row #************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $dmQ->insert("mbr_classify_dm", $dm); $dmQ->close(); #************************************************************************** #* Destroy form values and errors