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): ?> +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