diff --git a/src/buy_chocolate.php b/src/buy_chocolate.php index 3e593f9123fed578609fa975e51cbce6b5db1ebe..7934c29f71a5df79414ce101f01febf408181b5c 100644 --- a/src/buy_chocolate.php +++ b/src/buy_chocolate.php @@ -37,12 +37,12 @@ if($_SERVER["REQUEST_METHOD"] === "POST"){ $pdo = $connect_db(); $stmt = $pdo->prepare($sql); - $stmt->bindParams(':username', $username); - $stmt->bindParams(':chocolate_id', $chocolate_id); - $stmt->bindParams(':amount', $amount); - $stmt->bindParams(':totalprice', $totalprice); - $stmt->bindParams(':address', $address); - $stmt->bindParams(':time', $time); + $stmt->bindParam(':username', $username); + $stmt->bindParam(':chocolate_id', $chocolate_id); + $stmt->bindParam(':amount', $amount); + $stmt->bindParam(':totalprice', $totalprice); + $stmt->bindParam(':address', $address); + $stmt->bindParam(':time', $time); $stmt->execute();