diff --git a/index.php b/index.php index 3c2969a..7300b97 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ include 'db_conf.php'; // Query per ottenere tutti i prodotti -$sql = "SELECT p.ProductID, p.ProductName, c.Name AS 'CategoryName', p.Description, p.Price, p.StockQuantity FROM Products p JOIN Categories c ON p.CategoryID=c.CategoryID"; +$sql = "SELECT p.ProductID, p.ProductName, c.Name AS 'CategoryName', p.Description, p.Price, p.StockQuantity, p.ImagePath FROM Products p JOIN Categories c ON p.CategoryID=c.CategoryID"; $result = $conn->query($sql); if ($result === false) { @@ -17,17 +17,43 @@ if ($result === false) { TechStore - Prodotti @@ -42,28 +68,16 @@ if ($result === false) {

Prodotti TechStore

num_rows > 0): ?> - - - - fetch_fields(); - foreach ($fields as $field) { - echo ""; - } - ?> - - - - fetch_assoc()): ?> - - - - - - - -
" . htmlspecialchars($field->name) . "
+
+ fetch_assoc()): ?> +
+ Immagine prodotto +

+

+ +
+ +

Nessun prodotto trovato.