An error happened.
\n"; } } if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit"])) { if (isset($_POST["edit"])) foreach (get_users_products_array() as $product) { if ($product["public_id"] === $_POST["edit"]) { $edit_id = $_POST["edit"]; $edit_name = $product["name"]; $edit_description = $product["description"]; $edit_expiration = $product["expiration_date"]; } } } 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"], $_POST["expiration"])) { $erreur = "Something went wrong. Try again later.
"; } } else { $erreur = "One of the edited section is missing.
"; } } $product_list = ""; foreach (get_users_products_array() as $row) { $product_list = $product_list . "Nom | Description | Ajouté le | Expiration | Rangement associé | Editer | Supprimer |
---|