Aggiunto messaggio "nessun ordine associato"

This commit is contained in:
2026-01-18 15:20:31 +01:00
parent 5f276c6ba5
commit caed718bc6

View File

@@ -31,19 +31,18 @@ fclose($file);
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
</head> </head>
<body> <body>
<table>
<tr>
<th>ID Ordine</th>
<th>Prodotto</th>
<th>Importo</th>
</tr>
<?php <?php
if(count($ordini) == 0){
echo "<p>Nessun ordine associato all'utente</p>";
}
else{
echo "<table><tr><th>ID Ordine</th><th>Prodotto</th><th>Importo</th></tr>";
for($i=0; $i<count($ordini); $i++){ for($i=0; $i<count($ordini); $i++){
echo "<tr><td>" . $ordini[$i]->id . "</td><td>" . $ordini[$i]->product . "</td><td>" . number_format($ordini[$i]->importo,2,",",".") . "€</td></tr>"; echo "<tr><td>" . $ordini[$i]->id . "</td><td>" . $ordini[$i]->product . "</td><td>" . number_format($ordini[$i]->importo,2,",",".") . "€</td></tr>";
} }
?> echo "</table>";
}
</table> ?>
</body> </body>
</html> </html>