diff --git a/webhook.php b/webhook.php index 0b25c30..07ddda0 100644 --- a/webhook.php +++ b/webhook.php @@ -86,10 +86,10 @@ function add_requirement() { die("Connection failed: " . $conn->connect_error); } $stmt = $conn->prepare("DELETE FROM req where id = ?;"); - $stmt->bind('s', $item_id); + $stmt->bind_param('s', $item_id); $stmt->execute(); $stmt = $conn->prepare("INSERT INTO req (id, name, quantity) VALUES (?,?,?);"); - $stmt->bind('ssi', $item_id, $item_name, $quantity); + $stmt->bind_param('ssi', $item_id, $item_name, $quantity); $stmt->execute(); $conn->close(); send_html("Added to requirements"); @@ -106,7 +106,7 @@ function deposit(){ die("Connection failed: " . $conn->connect_error); } $stmt = $conn->prepare("UPDATE req set quantity = quantity - ? where id = ?;"); - $stmt->bind('is', $item_id, $quantity); + $stmt->bind_param('is', $item_id, $quantity); $stmt->execute(); $conn->close(); send_html("Deposited!");