From d5bf5168b56f14df35916546765d4b74895530c5 Mon Sep 17 00:00:00 2001
From: totoW <anthony.weiss1910@gmail.com>
Date: Fri, 12 Jan 2024 15:58:06 +0100
Subject: [PATCH] post presentation

---
 html/data_treatment/AJAXendcheckout.php           | 12 ++++++------
 startbootstrap-agency-gh-pages/purchased_item.php |  3 +--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/html/data_treatment/AJAXendcheckout.php b/html/data_treatment/AJAXendcheckout.php
index 4c14365..9f7ecf7 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 8064454..8ca64fc 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>
-- 
GitLab