diff --git a/catbar.php b/catbar.php index 62890dd..1bd84f2 100644 --- a/catbar.php +++ b/catbar.php @@ -12,27 +12,27 @@ diff --git a/compcards.php b/compcards.php index 52f0506..2f93518 100644 --- a/compcards.php +++ b/compcards.php @@ -1,44 +1,90 @@ + + + + + ['id' => 20, 'label' => 'iPhone'], + 'ipad' => ['id' => 21, 'label' => 'iPad'], + 'macbook' => ['id' => 22, 'label' => 'MacBook'], + 'airpods' => ['id' => 23, 'label' => 'AirPods'], + 'accessories' => ['id' => 24, 'label' => 'Accessories'], +]; +?> + + + $cat): ?> + + + + prepare(" + SELECT productID, model, description, imagePath + FROM products + WHERE categoryID = ? + "); + + $stmt->bind_param("i", $cat['id']); // i = integer + $stmt->execute(); + + $result = $stmt->get_result(); + ?> + + num_rows > 0): ?> +
+

+ +
+ fetch_assoc()): ?> +
+ <?= htmlspecialchars($product['model']) ?> + +
+

+

+
+
+ +
+
+ + + close(); ?> + + + + + + - - - - - - -
-

iPhone

-
-
...
-
...
-
...
-
-
- - - -
-

iPad

-
-
...
-
...
-
...
-
-
- - - -
-

MacBook

-
-
...
-
...
-
...
-
-
- + \ No newline at end of file