Aggiunto link pagina prodotto a prodotti homepage

This commit is contained in:
2026-04-01 11:37:44 +02:00
parent 87470a5f51
commit 52ea1e0c93
+2 -2
View File
@@ -37,8 +37,8 @@ if ($result === false) {
<div class="products-grid">
<?php while ($row = $result->fetch_assoc()): ?>
<div class="product-card">
<img src="img/<?php echo htmlspecialchars($row['ImagePath']); ?>" alt="Immagine prodotto">
<h3><?php echo htmlspecialchars($row['ProductName']); ?></h3>
<a href="product.php?id=<?php echo $row['ProductID']; ?>"><img src="img/<?php echo htmlspecialchars($row['ImagePath']); ?>" alt="Immagine prodotto"></a>
<h3><?php echo "<a href='product.php?id=" . $row['ProductID'] . "'>" . htmlspecialchars($row['ProductName']) . "</a>"; ?></h3>
<p><?php echo htmlspecialchars($row['Price']); ?>€</p>
<button>Aggiungi al carrello</button>
</div>