-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsub_categories.php
More file actions
139 lines (106 loc) · 4.56 KB
/
Copy pathsub_categories.php
File metadata and controls
139 lines (106 loc) · 4.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
// Include database connection file
include 'Admin Panel/connection.php';
?>
<?php
session_start();
// echo "<font color='red' size='5px';'>Welcome </font>" .", ". $_SESSION['user_email'];
include 'db.php';
$email = $_SESSION['user_email'];
if ($email == true) {
} else {
header('location:Login.php');
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="nikhil.css">
<link rel="stylesheet" href="Ratnakar.css">
<link rel="stylesheet" href="loader.css">
<title>
पाहुणचार</title>
<link rel="icon" type="img" href="img/logo1.jpeg">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css">
<title>All Pizzas</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link rel="stylesheet" href="nikhil.css">
<style>
.log {
max-width: 100%;
aspect-ratio: 3/3;
object-fit: contain;
}
.d:hover {
transform: scale(0.9);
box-shadow: 5px 5px 10px orange;
transition: all 0.4s ease-in-out;
}
</style>
</head>
<body>
<?php
include "inc/header.php";
?>
<br><br><br><br><br><br><br><br><br>
<div class="container mt-5">
<h2>Sub-Categories Page</h2>
<div class="row mt-3">
<?php
$title = $_GET['title'];
$data = "SELECT * FROM add_product WHERE pcategory = '$title' AND status = 1 ORDER BY id DESC";
// Check if the connection is successful
if ($conn) {
$data_show = mysqli_query($conn, $data);
// Check if the query was successfuld
if ($data_show) {
// Loop through each product
while ($show = mysqli_fetch_array($data_show)) {
?>
<div class="col-xxl-3 col-xl-3 col-lg-3 col-md-4 col-sm-6 col-sm-12 mt-2 d">
<div class="card h-100 border-0 rounded shadow">
<div class="mt-3"><img src="upload/<?php echo $show['thumb1']; ?>" class="card-img-top log"></div>
<div class="card-body" id="product3">
<h5 class="card-title text-center"><?php echo $show['ptitle']; ?></h5>
<h5 class="text-center">₹<?php echo $show['price']; ?></h5>
<div class="quantity">
<button onclick="decrement('product3')">-</button>
<input type="text" id="quantity_product3" value="1">
<button onclick="increment('product3')">+</button>
</div>
<div class="add-to-cart-btn d-flex justify-content-center my-3">
<button onclick="addToCart('product3')" class="btn-style ">Add to Cart</button>
</div>
</div>
</div>
</div>
<?php
}
} else {
echo "Error executing query: " . mysqli_error($conn);
}
// Close the database connection
mysqli_close($conn);
} else {
echo "Error connecting to the database: " . mysqli_connect_error();
}
?>
</div>
</div>
<script src="nikhil.js"></script>
<script src="loader.js"></script>
<div class="loader">
<img src="/PahuncharHMP2/loader.gif" alt="">
</div>
<?php
include "inc/footer.php";
?>
</body>
</html>