-
Notifications
You must be signed in to change notification settings - Fork 1
/
category_page.php
59 lines (39 loc) · 1.38 KB
/
category_page.php
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
<?php require_once("config.php"); ?>
<?php
if(isset($_GET['id'])) {
$query = query("SELECT * FROM categories WHERE cat_id = " . escape_string($_GET['id']) . " ");
confirm($query);
while($row = fetch_array($query)) {
$cat_title = escape_string($row['cat_title']);
}
}
?>
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Category</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="dropdown.css">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="container">
<?php include("navbar.php") ?>
</div>
<div class="small-container">
<div class="row row-2">
<a class="btn btn-primary" target="_blank" href="update_product_page.php">Update Products</a>
<h2>Category: <?php echo $cat_title; ?></h2>
<div class="dropdown">
<button class="dropbtn">Categories</button>
<div class="dropdown-content">
<?php get_categories();?>
</div>
</div>
</div>
<div class="row">
<?php get_category_products(); ?>
</div>
</div>
<?php include("footer.php") ?>