#**************************************************************************** #* Validate data #**************************************************************************** $dm = new Dm(); $dm->setCode($_POST["code"]); $_POST["code"] = $dm->getCode(); $dm->setDescription($_POST["description"]); $_POST["description"] = $dm->getDescription(); $dm->setDaysDueBack($_POST["daysDueBack"]); $_POST["daysDueBack"] = $dm->getDaysDueBack(); $dm->setDailyLateFee($_POST["dailyLateFee"]); $_POST["dailyLateFee"] = $dm->getDailyLateFee(); if (!$dm->validateData()) { $pageErrors["description"] = $dm->getDescriptionError(); $pageErrors["daysDueBack"] = $dm->getDaysDueBackError(); $pageErrors["dailyLateFee"] = $dm->getDailyLateFeeError(); $_SESSION["postVars"] = $_POST; $_SESSION["pageErrors"] = $pageErrors; header("Location: ../admin/collections_edit_form.php"); exit; } #************************************************************************** #* Update domain table row #************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $dmQ->update("collection_dm", $dm); $dmQ->close(); #************************************************************************** #* Destroy form values and errors #**************************************************************************