-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbook_list.php
59 lines (55 loc) · 2.33 KB
/
book_list.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
<?php
include 'conn.php';
include 'session.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<title>Booklist</title>
</head>
<style>
<?php include 'Style.css';?>
</style>
<body>
<?php include 'navbar.php';?>
<?php include 'sidenav.php';?>
<div class="container">
<div class="row">
<div class="col-xl-9 offset-xl-1 col-lg-9 offset-lg-2 col-md-10 offset-md-2 col-sm-9 offset-sm-3 ">
<h1>Book List</h1>
<table class="table table-striped" >
<thead>
<tr>
<th scope="col">S.No</th>
<th scope="col">Book Name</th>
<th scope="col">Author Name</th>
<th scope="col">ID</th>
<th scope="col">Action</th>
</tr>
</thead>
<?php
$q = " SELECT * FROM `books` ";
$result = mysqli_query($con, $q);
$counter =0;
while($row = mysqli_fetch_assoc($result)){
?>
<tbody>
<tr>
<th scope="row"><?php echo ++$counter; ?></th>
<td><?php echo $row['book'] ?></td>
<td><?php echo $row['author'] ?></td>
<td><?php echo $row['book_id'] ?></td>
<td><a href="book_list_remove.php?book_id= <?php echo $row['book_id'];?>" class="btn btn-outline-success me-2 " role="button" >Remove</a></td>
</tr>
</tbody>
<?php } ?>
</table>
</div>
</div>
</div>
</body>
</html>