Aggiunto messaggio "nessun ordine associato"
This commit is contained in:
19
ordini.php
19
ordini.php
@@ -31,19 +31,18 @@ fclose($file);
|
|||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<?php
|
||||||
<table>
|
if(count($ordini) == 0){
|
||||||
<tr>
|
echo "<p>Nessun ordine associato all'utente</p>";
|
||||||
<th>ID Ordine</th>
|
}
|
||||||
<th>Prodotto</th>
|
else{
|
||||||
<th>Importo</th>
|
echo "<table><tr><th>ID Ordine</th><th>Prodotto</th><th>Importo</th></tr>";
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
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>
|
||||||
Reference in New Issue
Block a user