diff --git a/list-cupboards.php b/list-cupboards.php index 36d9ac7..46f6d19 100644 --- a/list-cupboards.php +++ b/list-cupboards.php @@ -27,7 +27,11 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit"])) { if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit_completed"])) { if (isset($_POST["name"]) && isset($_POST["description"])) { - if (!update_cupboard($_POST["edit_completed"], $_POST["name"], $_POST["description"])) { + if (!update_cupboard( + $_POST["edit_completed"], + $_POST["name"], + $_POST["description"] + )) { $erreur = "

Something went wrong. Try again later.

"; } } else { diff --git a/list-products.php b/list-products.php index 0bccd64..b36cf0e 100644 --- a/list-products.php +++ b/list-products.php @@ -28,7 +28,12 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit"])) { if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit_completed"])) { if (isset($_POST["name"]) && isset($_POST["description"]) && isset($_POST["expiration"])) { - if (!update_product($_POST["edit_completed"], $_POST["name"], $_POST["description"], empty(trim($_POST["expiration"])) ? null : $_POST["expiration"])) { + if (!update_product( + $_POST["edit_completed"], + $_POST["name"], + $_POST["description"], + empty(trim($_POST["expiration"])) ? null : $_POST["expiration"] + )) { $erreur = "

Something went wrong. Try again later.

"; } } else { @@ -49,10 +54,10 @@ foreach (get_users_products_array() as $row) { . "" . htmlspecialchars($row["cupboard_name"] !== NULL ? $row["cupboard_name"] : "-") . "" - . "
" . "" - . "
" . "\n"; }