diff --git a/html/data_treatment/AJAXendcheckout.php b/html/data_treatment/AJAXendcheckout.php index 4c14365703d9dc21cb453d9ca92dfa5151a198f4..9f7ecf70f256b9ef8826f7f80e24c71370b220ee 100644 --- a/html/data_treatment/AJAXendcheckout.php +++ b/html/data_treatment/AJAXendcheckout.php @@ -55,12 +55,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $itemName = $item['itemName']; $quantityOrdered = $item['quantity']; - // Adjust the SQL query based on your table structure - $updateQuantitySQL = "UPDATE articles SET quantity = quantity - ? WHERE itemName = ?"; - $stmt = $conn->prepare($updateQuantitySQL); - $stmt->bind_param("is", $quantityOrdered, $itemName); - $stmt->execute(); - $stmt->close(); + // // Adjust the SQL query based on your table structure + // $updateQuantitySQL = "UPDATE articles SET quantity = quantity - ? WHERE itemName = ?"; + // $stmt = $conn->prepare($updateQuantitySQL); + // $stmt->bind_param("is", $quantityOrdered, $itemName); + // $stmt->execute(); + // $stmt->close(); $item['itemName'] = json_decode('"' . $item['itemName'] . '"'); $text .= "- " . $item['quantity'] . " " . $item['itemName'] . " which costs "; if ($item['quantity'] >= 16) { diff --git a/startbootstrap-agency-gh-pages/purchased_item.php b/startbootstrap-agency-gh-pages/purchased_item.php index 806445422a4eb06f6079616e99c12e9f6dc9b7e6..8ca64fc74baab062f7f794dc9a94628853fec11f 100644 --- a/startbootstrap-agency-gh-pages/purchased_item.php +++ b/startbootstrap-agency-gh-pages/purchased_item.php @@ -15,7 +15,6 @@ if(!isset($_SESSION["username"])){ </script> <?php -session_start(); // Include your database connection code here include("../html/data_treatment/connect_database.php"); @@ -133,4 +132,4 @@ p { hr { border: 1px solid #ddd; } -</style> \ No newline at end of file +</style>