$Name = $_POST['Ownership']; } //get name amharic if (empty($_POST['Ownership_Amharic'])) { $errors[] = "Ownership in amharic should be filled"; } else { $Name_Amharic = $_POST['Ownership_Amharic']; } //get Ownership id if (empty($_POST['Ownership_ID'])) { $errors[] = "Ownership ID should be filled"; } else { $Ownership_ID = $_POST['Ownership_ID']; } if (empty($errors)) { $Ownership = new Ownership($Name, $Name_Amharic); if ($encoder_con->Ownership_Exists_For_Edit($Ownership, $Ownership_ID)) { encoder_place_redirect(Error_Type::SAME_USER_NAME, $Ownership_ID); } $added = $encoder_con->Edit_Ownership($Ownership, $Ownership_ID); if ($added) { encoder_redirect_success(); } else { encoder_place_redirect(Error_Type::DATA_BASE, $Ownership_ID); } } else { encoder_place_redirect(Error_Type::FORM, $Ownership_ID); } } } }