connect_error) { die('Connection failed: ' . $conn->connect_error); } $stmt = $conn->prepare('INSERT INTO whishes (title, description, link, image, price) VALUES (?, ?, ?, ?, ?)'); if (false === $stmt) { die('prepare() failed: ' . htmlspecialchars($mysqli->error)); } $rc = $stmt->bind_param('ssssi', $ItemTitle, $ItemDescription, $imageLocalLink, $ItemImage, $ItemPriceCents); if (false === $rc) { die('bind_param() failed: ' . htmlspecialchars($stmt->error)); } $rc = $stmt->execute(); if (false === $rc) { die('execute() failed: ' . htmlspecialchars($stmt->error)); } $stmt->close(); $conn->close(); header('Location: ' . $_SERVER['HTTP_REFERER']);