-
Notifications
You must be signed in to change notification settings - Fork 0
/
women.php
128 lines (102 loc) · 3.69 KB
/
women.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
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="icon" href="images/icon.png">
<title>E-Commerce Forum</title>
</head>
<body>
<nav class="navbar navbar-light bg-light">
<a class="navbar-brand" href="index.php">
<img src="images/icon.png" width="30" height="30" class="d-inline-block align-top" alt="">
E-Commerce Forum
</a>
</nav>
<div class="jumbotron">
<div class="container">
<h1 class="display-3">Forums : Women</h1>
<nav class="navbar navbar-expand-sm navbar-light">
<div class="navbar-nav">
<a class="nav-item nav-link" href="index.php">All <span class="sr-only">(current)</span></a>
<a class="nav-item nav-link" href="electronics.php">Electronics</a>
<a class="nav-item nav-link" href="tv.php">TV & Appliances</a>
<a class="nav-item nav-link" href="men.php">Men</a>
<a class="nav-item nav-link active" href="women.php">Women</a>
<a class="nav-item nav-link" href="baby.php">Baby & Kids</a>
<a class="nav-item nav-link" href="home.php">Home & Furniture</a>
<a class="nav-item nav-link" href="sports.php">Sports & Books</a>
<a class="nav-item nav-link" href="others.php">Others</a>
<a class="nav-item nav-link" href="#"></a>
</div>
</nav>
<div class="d-flex bd-highlight mb-3">
<div class="p-2 bd-highlight"></div>
<div class="p-2 bd-highlight">
<a class="btn btn-primary btn-info" href="new.php" role="button">+ New Topic</a>
</div>
<div class="ml-auto p-2 bd-highlight"></div>
</div>
</div>
</div>
<div class="container">
<table class="table table-striped ">
<thead>
<tr>
<th scope="col">Forum</th>
<th scope="col">Category</th>
<th scope="col">Posts</th>
<th scope="col">Date/Time</th>
</tr>
</thead>
<tbody>
<?php
$con = mysqli_connect("localhost","root","");
mysqli_select_db($con,"forum");
$insert_query = "select * from forum where topic='Women' order by id desc";
$res=mysqli_query($con, $insert_query);
// $arr=mysqli_fetch_array($res);
if(mysqli_num_rows($res)>0){
while($row=mysqli_fetch_assoc($res)){
$z="select COUNT(comment) from comments where post_id=$row[id]";
$zz=mysqli_query($con, $z);
$zzz=mysqli_fetch_array($zz);
echo "<tr>
<td><a href=\"post.php?id=$row[id]\" class=\"text-dark\">$row[question]</a></td>
<td>$row[topic]</td>
<td>$zzz[0]</td>
<td>$row[time]</td>
</tr>";
}
}
else
{
echo "<tr>
<td>No Forums Found</td>
<td></td>
<td></td>
<td></td>
</tr>";
}
?>
</tbody>
</table>
</div>
<br><br><br>
<footer>
<center>
<h6 class="footer">Designed with ❤️ by Subhajit Mondal<h6>
</center>
</footer>
</body>
</html>
<!--Electronics
TVs & Appliances
Men
Women
Baby & Kids
Home & Furniture
Sports, Books & More
others
-->