From de9e776af0b730af1adde4d78ecff2ea793b3267 Mon Sep 17 00:00:00 2001 From: Tanni Date: Sun, 13 Apr 2025 10:26:02 +0600 Subject: [PATCH 1/2] Delete db.php --- db.php | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 db.php diff --git a/db.php b/db.php deleted file mode 100644 index 5b97f0b..0000000 --- a/db.php +++ /dev/null @@ -1,15 +0,0 @@ -connect_error) { - die("Connection failed: " . $conn->connect_error); -} -?> - From 615c7edd05d140fc1c0bb073244b5cca5d0a1b22 Mon Sep 17 00:00:00 2001 From: Tanni Date: Tue, 15 Apr 2025 17:50:46 +0600 Subject: [PATCH 2/2] Create index.php update --- index.php | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 index.php diff --git a/index.php b/index.php new file mode 100644 index 0000000..3350ecf --- /dev/null +++ b/index.php @@ -0,0 +1,125 @@ + + + + + + + + + + Book Store + + + +
+

Welcome, !

+

Explore our collection of books and shop your favorites.

+ + +
+
+ +
+ +
+
+
+ +
+ prepare($searchQuery); + $searchTerm = '%' . $search . '%'; + $stmt->bind_param("sss", $searchTerm, $searchTerm, $searchTerm); + $stmt->execute(); + $result = $stmt->get_result(); + + if ($result->num_rows > 0): + while ($row = $result->fetch_assoc()): + ?> +
+
+ <?= htmlspecialchars($row['title'] ?? 'No Title'); ?> +
+
+ + + +
+

Author:

+

Price: $

+ + + " class="btn btn-primary">Add to Cart + + + +
+
+
+ +

No books found matching your search.

+ +
+
+ + + + + + + + + + + + + + + +