public function updateProductAction() { if (isset($_GET["id"])) { $product = ProductManager::getProduct($_GET["id"]); } require "src/Ecommerce/view/back/updateproduct.php"; if (isset($_POST["update"])) { if (!empty($_POST["name"]) && !empty($_POST["description"]) && !empty($_POST["price"])) { ProductManager::updateProduct($_POST["id"], $_POST["name"], $_POST["description"], $_POST["price"]); header("Location: index.php?controller=Back&method=management"); } else { echo "champs incomplets"; } } }