Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1b2b98f

Browse files
authoredMay 15, 2023
Merge pull request #293 from solotobby/new_pr_update
fixed bug and make book not permanently deleted
2 parents df5ec28 + eb251d0 commit 1b2b98f

File tree

3 files changed

+2
-40
lines changed

3 files changed

+2
-40
lines changed
 

‎SYSTEM MANAGEMENT APPS/Bookstore management/MiniProject/MiniProject/dashboard.php

+1-26
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
header('Location: manage.php');
1010
}
1111
if($_POST['deletereq']){
12-
1312
$query = $link->prepare('DELETE FROM `books` WHERE `book_id` = ?');
14-
$query -> bind_param("i", $_POST['deletereq']);
13+
$query->bind_param("i", $_POST['deletereq']);
1514
if($query->execute()){
1615
header('Location: dashboard.php');
1716
}
@@ -27,10 +26,8 @@
2726
<!-- Required meta tags -->
2827
<meta charset="utf-8">
2928
<meta name="viewport" content="width=device-width, initial-scale=1">
30-
3129
<!-- Bootstrap CSS -->
3230
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
33-
3431
<!-- Site Icon -->
3532
<link rel="icon" href="Resources/A-Dot-Icon.png">
3633
<!-- Custom Css -->
@@ -58,8 +55,6 @@
5855
<br><br><br><br><br>
5956

6057
<div class="container">
61-
62-
6358
<div class="row">
6459
<div class="col"></div>
6560
<div class="col">
@@ -144,22 +139,13 @@
144139

145140
</div>
146141
<div class="row">
147-
<div class="col">
148-
<form method="post">
149-
<input type="hidden" value="<?=$books['book_id']?>" name="deletereq">
150-
<button class="know-more-btn" type="submit">
151-
Delete Book
152-
</button>
153-
</form>
154-
</div>
155142
<div class="col">
156143
<button class="know-more-btn" type="button" data-bs-toggle="collapse" data-bs-target="#my<?=$idnum?>" aria-expanded="false" aria-controls="collapseExample">
157144
View Details &#8594
158145
</button>
159146
</div>
160147
</div>
161148
<br>
162-
163149
</div>
164150
</div>
165151
<div class="collapse" id="my<?=$idnum?>">
@@ -195,7 +181,6 @@
195181
</div>
196182
<br>
197183
<?php
198-
199184
}
200185
}
201186
else{
@@ -209,18 +194,8 @@
209194
}
210195
}
211196
?>
212-
213-
214-
215-
216-
217-
218197
<br>
219-
220198
</div>
221-
222-
223199
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
224-
225200
</body>
226201
</html>

‎SYSTEM MANAGEMENT APPS/Bookstore management/MiniProject/MiniProject/login.php

-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
if(isset($_COOKIE["email"])){
44
header('Location: index.php');
55
}
6-
7-
86
require_once "connection.php";
97

10-
118
if($_POST){
129

1310
$msg = '';

‎SYSTEM MANAGEMENT APPS/Bookstore management/MiniProject/MiniProject/profile.php

+1-11
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@
126126

127127
<div class="row">
128128
<div class="col">
129-
<strong> Name :</strong> <?= $row['user_id'];?>
130-
129+
<strong> Name :</strong> <?= $row['name'];?>
131130
</div>
132131
<div class="col">
133132
<strong> Email:</strong> <?=$row['email']?>
@@ -138,15 +137,6 @@
138137

139138

140139
</div>
141-
<!-- <div class="row">
142-
<div class="col"></div>
143-
<div class="col">
144-
<button class="know-more-btn" type="button" data-bs-toggle="collapse" data-bs-target="#my2" aria-expanded="false" aria-controls="collapseExample">
145-
On View Details &#8594
146-
</button>
147-
</div>
148-
</div> -->
149-
<!-- <br> -->
150140

151141
</div>
152142
</div>

0 commit comments

Comments
 (0)
Please sign in to comment.