diff --git a/Controllers/RecipeController.php b/Controllers/RecipeController.php index 0bd9a4b..521e1b7 100644 --- a/Controllers/RecipeController.php +++ b/Controllers/RecipeController.php @@ -169,6 +169,11 @@ final class RecipeController } } + // delete all remaining ingredients, they have been deleted by the user + foreach($A_ingrsInDB as $O_ingr){ + $O_ingr->delete(); + } + header("Location: /recipe/view/".$O_recipe->I_ID); }