Aggiunto messaggio "nessun ordine associato"
This commit is contained in:
17
ordini.php
17
ordini.php
@@ -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>
|
||||
Reference in New Issue
Block a user