From d4d4541e15bddf83ae583de62cf4497fae4d0feb Mon Sep 17 00:00:00 2001 From: Faris Rizki Ekananda <13518125@std.stei.itb.ac.id> Date: Sun, 25 Oct 2020 19:03:00 +0700 Subject: [PATCH] params fix --- src/buy_chocolate.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/buy_chocolate.php b/src/buy_chocolate.php index 3e593f9..7934c29 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(); -- GitLab