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">
</head>
<body>
<table>
<tr>
<th>ID Ordine</th>
<th>Prodotto</th>
<th>Importo</th>
</tr>
<?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++){
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>
</html>