From c0efd68ace01f98e7df8421dc43b730a8c06fb49 Mon Sep 17 00:00:00 2001 From: Andrea Fiorencis Date: Wed, 25 Feb 2026 11:50:29 +0100 Subject: [PATCH] Troppe modifiche non ce la faccio --- index.php | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/index.php b/index.php index 65e5363..fccb727 100644 --- a/index.php +++ b/index.php @@ -34,29 +34,34 @@ $result = mysqli_query($conn, $sql); Ordini del cliente " . $customer_id . ""; + if((isset($_GET["customerId"]) || isset($_GET["orderId"])) && mysqli_num_rows($result) > 0) { + echo "
"; + echo ""; + echo ""; + echo "
"; + # Reset index della query + mysqli_data_seek($result, 0); + } + if(isset($_GET["orderId"])){ echo ""; echo ""; - if (mysqli_num_rows($result) == 0) { - echo ""; - } - else { - echo ""; - } + echo ""; echo ""; while ($row = mysqli_fetch_assoc($result)) { echo ""; - echo "" ; + echo "" ; + echo "" ; + echo ""; + echo "" ; + echo ""; echo ""; } - echo "
Il cliente ". $customer_id ." non ha ordiniID OrdineID ProdottoNome ProdottoQuantità per unitàPrezzoQuantità ordinata
" . $row['OrderID'] ."" . $row['ProductID'] . "" . $row['ProductName'] . "" . $row['Unit'] . "" . $row['Price'] . "$" . $row['order_quantity'] . "
"; } - else if(isset($_GET["orderId"])){ - echo "WIP"; - } - else { + if(!isset($_GET["customerId"]) && !isset($_GET["orderId"])){ echo "
"; echo "