-
Notifications
You must be signed in to change notification settings - Fork 1
/
deleteproduct.php
203 lines (162 loc) · 4.57 KB
/
deleteproduct.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?php
session_start();
?>
<?php
$mysession = $_SESSION['emailadd'];
$db = mysqli_connect("localhost", "root", "", "myshopdb");
$sql = "SELECT * FROM logininfo WHERE emailadd='$mysession'";
$records = mysqli_query($db, $sql);
$details = mysqli_fetch_assoc($records);
?>
<!DOCTYPE html>
<html>
<headhtnl
Head.b
Body
<title>My Shop</title>
<link rel="stylesheet" href="css.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="animate.css">
<style>
body
*{
box-sizing: border-box;
}
#btn{
width: 50%;
height: auto;
margin: 0 auto;
} ffj
gvv
.btn-size{
width: 100%;
heigjsh
hehehht: 100px;
margin: 5px;
border-width: 2px;
background-color: aquamarine;
border-radius: 5px;
font-weight: bold;
font-size: 15px;
border-style: outset;
}
#btn{
width: 50%;
height: auto;
margin: 0 auto;
} ffj
gvv
.btn-size{
width: 100%;
heigjsh
hehehht: 100px;
margin: 5px;
border-width: 2px;
background-color: aquamarine;
border-radius: 5px;
font-weight: bold;
font-size: 15px;
border-style: outset;
}
.btn-size:hover{
width: 100%;
height: 100px;
margin: 5px;
border-width: 2px;
background-color: aquamarine;
border-radius: 8px;
font-weight: bold;
font-size: 17px;
border-style: inherit;
cursor: pointer;
}
#an-div{
width: 100%;
height: auto;
}
#animated zoomIn infinite{
margin: 0 auto;
font-size: 50px;
}
td{
height: 40px;
}
td{
height: 40px;
}
table{
margin: 0 auto;
margin-top: 2%;
margin-bottom: 2%;
}
th{
background-color: greenyellow;
}
</style>
</head>
<body>
<div id="outer-box">
<header>
<h1 id="brand-name">myshop.com</h1>
<p id="tag-lines">India`s largest Online e-commerce website</p>
</header>
<div id="white-space-header"></div>
<nav>
<div id="left-nav"><form>
<input type="search" name="search" onkeyup="searchfn()" id="search-box" placeholder="Search the Products"/>
<input type="submit" value="Search Now" id="search-btn"/>
</form>
</div>
<div id="right-nav">
<div id="right-nav-upper">
<i class="fa fa-user" style="font-size:20px; margin-right:10px; margin-left:10px;"></i>
<?php echo $details['uname']; ?> -- <?php echo $details['emailadd']; ?>
</div>
<div id="menu">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="access.php">Accesories</a></li>
<li><a href="offer.php">Offers Zone</a></li>
<li><a href="about.php">About Us</a></li>
<li><a href="fcontact.php">Contact Us</a></li>
<li><a href="logout.php">Logout</a></li>
<li><a href="cart.php"><i class="fa fa-shopping-cart" style="font-size:24px"><span id="cartno"><sup>0</sup></span></i></a></li>
</ul>
</div>
</div>
</nav>
<div id="white-space-nav"></div>
<div id="side-fix-div">
<div id="search-by-category-div">
<h1 id="search-by-category" class="animated zoomIn infinite">Welcome to C-Panel</h1>
<div id="btn">
<a href="addproduct.php"><button class="btn-size">Add Product</button></a>
<a href="remproduct.php"><button class="btn-size">Remove Product</button></a>
<a href="updateproduct.php"><button class="btn-size">Update Product</button></a>
<a href="deleteproduct.php"><button class="btn-size">Remove User</button></a>
</div>
</div>
<div id="search-by-category-div2">
</div>
</div>
<div id="side-right-div">
<div id="an-div">
<?php
$db = mysqli_connect("localhost", "root", "", "myshopdb");
$sql = "SELECT * FROM logininfo";
$records = mysqli_query($db, $sql);
echo "<table border='2' width='70%'>";
echo "<tr> <th back>Product Id</th> <th> Product Name </th> <th>Mobile Number</th><th>Location</th> <th>Delete User</th> ";
while($row = $records->fetch_assoc())
{
$z = $row["pid"];
echo "<tr> <td align='center'>" .$row["uname"]. "</td> <td align='center'>" .$row["emailadd"]. "</td> <i class='fa fa-trash' aria-hidden='true' onclick="click();"></i></td> </tr>";
}
echo "</table>";
?>
</div>
</div>
</div>
<script>window.alert(Hello);</script>
</body>
</html>