Bugfix - whises where always added to list 0
This commit is contained in:
@@ -9,6 +9,7 @@ $ItemDescription = $_POST['ItemDescription'];
|
||||
$ItemPrice = $_POST['ItemPrice'];
|
||||
$ItemLink = $_POST['ItemLink'];
|
||||
$ItemImage = $_POST['ItemImage'];
|
||||
$ListID = $_POST['ItemListID'];
|
||||
|
||||
#--- check if the provided Link is a valid URL
|
||||
|
||||
@@ -41,13 +42,13 @@ if ($conn->connect_error) {
|
||||
die('Connection failed: ' . $conn->connect_error);
|
||||
}
|
||||
|
||||
$stmt = $conn->prepare('INSERT INTO whishes (title, description, link, image, price) VALUES (?, ?, ?, ?, ?)');
|
||||
$stmt = $conn->prepare('INSERT INTO whishes (title, description, link, image, price, whislist) VALUES (?, ?, ?, ?, ?, ?)');
|
||||
|
||||
if (false === $stmt) {
|
||||
die('prepare() failed: ' . htmlspecialchars($mysqli->error));
|
||||
}
|
||||
|
||||
$rc = $stmt->bind_param('ssssi', $ItemTitle, $ItemDescription, $ItemLink, $imageLocalLink, $ItemPriceCents);
|
||||
$rc = $stmt->bind_param('ssssii', $ItemTitle, $ItemDescription, $ItemLink, $imageLocalLink, $ItemPriceCents, $ListID);
|
||||
if (false === $rc) {
|
||||
die('bind_param() failed: ' . htmlspecialchars($stmt->error));
|
||||
}
|
||||
|
Reference in New Issue
Block a user