From 203a6901cfd3d95a1fe95a452f1ea39294fd271a Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 18 Feb 2026 21:30:21 +0100 Subject: [PATCH] Button for adding to wishlist works, Database userFavorites included --- compcards.php | 2 -- productpage.php | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/compcards.php b/compcards.php index a47e7e8..b73b1e7 100644 --- a/compcards.php +++ b/compcards.php @@ -5,8 +5,6 @@ ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); -session_start(); - // 1) DB-Verbindung (einmal) $servername = "localhost"; $port = 3306; diff --git a/productpage.php b/productpage.php index 0f15db5..ddfb92a 100644 --- a/productpage.php +++ b/productpage.php @@ -178,9 +178,54 @@ $productId = isset($_GET['id']) ? (int)$_GET['id'] : 0; -
bind_param("i", $productId); + $stmt->execute(); + $result = $stmt->get_result(); + + $shopInfo = []; + + while ($row = $result->fetch_assoc()) { + $shopInfo[] = $row; + } + + + + ?> + +
+ + + + + +
+ + +
+ + Preis:
+ Versand:
+ Lagernd: +
+ + + + +

Keine Shops bieten dieses Produkt an.

+ + +
close(); ?> +