From a5b4ddd6557aa95ebbf15fdaef254f28af372cb2 Mon Sep 17 00:00:00 2001 From: Andrea Fiorencis Date: Wed, 1 Apr 2026 12:22:27 +0200 Subject: [PATCH] Implementazione primo prototipo pagina prodotto singolo --- product.php | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ style.css | 35 +++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 product.php diff --git a/product.php b/product.php new file mode 100644 index 0000000..fc65de3 --- /dev/null +++ b/product.php @@ -0,0 +1,65 @@ +prepare($sql)) { + $stmt->bind_param("i", $product_id); + $stmt->execute(); + $result = $stmt->get_result(); + $product = $result->fetch_assoc(); + $stmt->close(); +} else { + die("Errore nella query: " . $conn->error); +} +?> + + + + + + + num_rows > 0): ?> + TechStore - <?php echo htmlspecialchars($result->fetch_assoc()['CategoryName']); ?> + + Prodotto non trovato - TechStore + + + + +
+ +
+ + + + Benvenuto, + + + +
+
+ + +
+ Immagine prodotto +
+

+

Categoria:

+

Descrizione:

+

Prezzo: €

+

Quantità disponibile:

+ +
+
+ +

Prodotto non trovato.

+ + + close(); ?> + + diff --git a/style.css b/style.css index 65faa83..cebf452 100644 --- a/style.css +++ b/style.css @@ -85,4 +85,39 @@ form button { form button:hover { background-color: #218838; +} + +/* Stili per la pagina prodotto */ +.product-detail { + max-width: 800px; + margin: 20px auto; + padding: 20px; + border: 1px solid #ddd; + border-radius: 8px; + background-color: #fff; + display: flex; + flex-direction: column; +} + +.product-detail img { + max-width: 100%; + height: auto; + margin-bottom: 20px; + flex-shrink: 0; +} + +.product-detail > div { + flex: 1; +} + +@media (min-width: 768px) { + .product-detail { + flex-direction: row; + } + + .product-detail img { + max-width: 40%; + margin-bottom: 0; + margin-right: 20px; + } } \ No newline at end of file