From 6459b309608781a8135d3ef4861da2c909cfb60e Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Mon, 11 Nov 2019 14:53:30 +0100 Subject: [PATCH] added table display on list products --- list-products.php | 53 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/list-products.php b/list-products.php index cf2198b..dbd83d9 100644 --- a/list-products.php +++ b/list-products.php @@ -8,21 +8,66 @@ if (!is_connected()) { $product_list = ""; foreach (get_users_products_array() as $row) { - $product_list = $product_list . "

" - . htmlspecialchars($row["name"]) . "

\n"; + $product_list = $product_list . "" + . htmlspecialchars($row["name"]) + . "" + . htmlspecialchars($row["description"]) + . "" + . htmlspecialchars($row["added_date"]) + . "" + . htmlspecialchars($row["expiration_date"] !== NULL ? $row["expiration_date"] : "-") + . "" + . htmlspecialchars($row["cupboard_name"] !== NULL ? $row["cupboard_name"] : "-") + . "\n"; } ?> + + List products + - + + + + + + + + + + + + + +
+ Nom + + Description + + Ajouté le + + Expiration + + Rangement associé +
- + + \ No newline at end of file