Fix parameter binding in offerAdder for database insertion

This commit is contained in:
Fabian Schieder 2026-04-06 21:06:10 +02:00
parent fe4aee5c25
commit d4c58547d0

View File

@ -32,7 +32,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST['
if ($productID > 0 && $shopID > 0 && $price >= 0) {
$stmt = $conn->prepare("INSERT INTO offers (productID, shopID, price, shippingCost, inStock, offerURL) VALUES (?, ?, ?, ?, ?, ?)");
$stmt->bind_param("iiddiss", $productID, $shopID, $price, $shippingCost, $inStock, $offerURL);
$stmt->bind_param("iiddis", $productID, $shopID, $price, $shippingCost, $inStock, $offerURL);
if ($stmt->execute()) {
$message = 'Angebot erfolgreich hinzugefügt!';
$messageType = 'success';