-
Notifications
You must be signed in to change notification settings - Fork 0
/
subcat.php
95 lines (73 loc) · 1.8 KB
/
subcat.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
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
<?php
require('includes/config.php');
session_start();
$cat=$_GET['cat_nm'];
$q = "select * from subcat where parent_id = ".$_GET['cat'];
$res = mysqli_query($conn,$q) or die("Can't Execute Query..");
$row1 = mysqli_fetch_assoc($res);
if($_GET['catnm']==$row1['subcat_nm'])
{
header("location:booklist.php?subcatid=".$row1['subcat_id']."&subcatnm=".$row1["subcat_nm"]);
}
?>
<!DOCTYPE html>
<html >
<head>
<?php
include("includes/head.inc.php");
?>
</head>
<body>
<!-- start header -->
<div id="header">
<div id="menu">
<?php
include("includes/menu.inc.php");
?>
</div>
</div>
<!-- <div id="logo-wrap"> -->
<div id="logo">
<?php
include("includes/logo.inc.php");
?>
</div>
<!-- </div> -->
<!-- end header -->
<!-- start page -->
<div id="page">
<!-- start content -->
<div id="content">
<div class="post">
<h1 class="title"><?php echo $_GET['catnm'];?></h1>
<div class="entry">
<?php
Do
{
echo '<li><a href="booklist.php?subcatid='.$row1['subcat_id'].'&subcatnm='.$row1["subcat_nm"].'">'.$row1['subcat_nm'].'</a></li>';
//&subcatnm='.$row1["subcat_nm"].'
}while($row1 = mysqli_fetch_assoc($res))
?>
</div>
</div>
</div>
<!-- end content -->
<!-- start sidebar -->
<div id="sidebar">
<?php
include("includes/search.inc.php");
?>
</div>
<!-- end sidebar -->
<div style="clear: both;"> </div>
</div>
<!-- end page -->
<!-- start footer -->
<div id="footer">
<?php
include("includes/footer.inc.php");
?>
</div>
<!-- end footer -->
</body>
</html>