An item is in this cupboard, you can't delete it now.
\n"; } } if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit"])) { if (isset($_POST["edit"])) foreach (get_users_cupboards_array() as $cupboard) { if ($cupboard["public_id"] === $_POST["edit"]) { $edit_id = $_POST["edit"]; $edit_name = $cupboard["name"]; $edit_description = $cupboard["description"]; } } if ($edit_id === "") { $erreur = "Unknown cupboard.
"; } } 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"] )) { $erreur = "Something went wrong. Try again later.
"; } } else { $erreur = "One of the edited section is missing.
"; } } $cupboard_list = ""; foreach (get_users_cupboards_array() as $row) { $cupboard_list = $cupboard_list . "Nom | Description | Editer | Supprimer |
---|