-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshow_all.php
152 lines (137 loc) · 4.23 KB
/
show_all.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html>
<head>
<title>Database</title>
<link rel="stylesheet" type="text/css" href="css/showall.css">
<link rel="stylesheet" type= "text/css" href="css/headerlayout.css">
</head>
<body>
<header>
<div class="logo"><a href="index.php" > <img src="img/logo.jpg" height="60px" width="60px" > SHOPMe</a></div>
</header>
<div class="main">
<h1 style="text-align: center;"> PRODUCT DETAILS</h1>
<div class="upperhalf">
<table align= "center" border="1px solid black" >
<tr>
<th>cat_id</th>
<th>brand_id</th>
<th>pr_id</th>
<th>pr_name</th>
<th>pr_image</th>
<th>brand_id</th>
<th>pr_details</th>
<th>keyword</th>
<th>stock</th>
</tr>
<?php
include "connect.php";
$sql = "SELECT * FROM product";
$result= mysqli_query($con, $sql);
if($result)
{
if(mysqli_num_rows($result))
{
while($row = mysqli_fetch_assoc($result))
{
echo "<tr><td>".$row['cat_id']."</td><td>".$row['brand_id']."</td><td>".$row['pr_id']."</td><td>".$row['pr_name']."</td><td>".$row['pr_image']."</td><td>".$row['brand_id']."</td><td>".$row['pr_details']."</td><td>".$row['keyword']."</td><td>".$row['stock']."</td></tr>";
/*echo "<tr>";
echo "<td>{$row['cat_id']}</td>";
echo "<td>{$row['brand_id']}</td>";
echo "<td>{$row['pr_id']}</td>";
echo "<td>{$row['pr_name']}</td>";
echo "<td>{$row['pr_image']}</td>";
echo "<td>{$row['pr_details']}</td>";
echo "<td>{$row['keyword']}</td>";
echo "<td>{$row['stock']}</td>";
echo "</tr>";*/
}
}else{
echo 'No Data For This Id';
}
}else{
echo 'Result Error';
}
?>
</table>
</div>
<br>
<div class=".lowerhalf" style="float: left; padding-left: 80px; padding-top: 20px;">
<h1> BRAND DETAILS</h1>
<table border="0.5px solid black">
<tr>
<th>brand_id</th>
<th>brand_title</th>
</tr>
<?php
include "connect.php";
$sql = "SELECT * FROM brands";
$result= mysqli_query($con, $sql);
if($result)
{
if(mysqli_num_rows($result))
{
while($row = mysqli_fetch_assoc($result))
{
echo "<tr><td>".$row['brand_id']."</td><td>".$row['brand_title']."</td></tr>";
/*echo "<tr>";
echo "<td>{$row['cat_id']}</td>";
echo "<td>{$row['brand_id']}</td>";
echo "<td>{$row['pr_id']}</td>";
echo "<td>{$row['pr_name']}</td>";
echo "<td>{$row['pr_image']}</td>";
echo "<td>{$row['pr_details']}</td>";
echo "<td>{$row['keyword']}</td>";
echo "<td>{$row['stock']}</td>";
echo "</tr>";*/
}
}else{
echo 'No Data For This Id';
}
}else{
echo 'Result Error';
}
?>
</table>
</div>
<div class=".upperhalf" style="float: right; padding-right: 80px; padding-top: 20px">
<h1>CATEGORY DETAILS </h1>
<table border="1px solid black">
<tr>
<th>cat_id</th>
<th>cat_title</th>
</tr>
<?php
include "connect.php";
$sql = "SELECT * FROM categories";
$result= mysqli_query($con, $sql);
if($result)
{
if(mysqli_num_rows($result))
{
while($row = mysqli_fetch_assoc($result))
{
echo "<tr><td>".$row['cat_id']."</td><td>".$row['cat_title']."</td></tr>";
/*echo "<tr>";
echo "<td>{$row['cat_id']}</td>";
echo "<td>{$row['brand_id']}</td>";
echo "<td>{$row['pr_id']}</td>";
echo "<td>{$row['pr_name']}</td>";
echo "<td>{$row['pr_image']}</td>";
echo "<td>{$row['pr_details']}</td>";
echo "<td>{$row['keyword']}</td>";
echo "<td>{$row['stock']}</td>";
echo "</tr>";*/
}
}else{
echo 'No Data For This Id';
}
}else{
echo 'Result Error';
}
?>
</table>
</div>
</div>
</body>
</html>