-
Notifications
You must be signed in to change notification settings - Fork 0
/
bookslist.php
59 lines (52 loc) · 1.88 KB
/
bookslist.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 "includes/header.php";
include "includes/db-inc.php";
?>
<div class="container">
<!-- navbar ends -->
<!-- info alert -->
<div class="alert alert-warning col-lg-7 col-md-12 col-sm-12 col-xs-12 col-lg-offset-2 col-md-offset-0 col-sm-offset-1 col-xs-offset-0" style="margin-top:70px">
<span class="glyphicon glyphicon-book"></span>
<strong>List of Books in the Library</strong>
</div>
</div>
<div class="container">
<div class="row">
<a href="index.php"><button class="btn btn-success col-lg-3 col-md-4 col-sm-11 col-xs-11 button" style="margin-left: 15px;margin-bottom: 5px"><span class="glyphicon glyphicon-home"></span>  HOME</button></a>
</div>
<div class="panel panel-default">
<table class="table table-bordered">
<thead>
<tr>
<th>BookId</th>
<th>bookTitle</th>
<th>author</th>
<th>ISBN</th>
<th>publisherName</th>
<th>categories</th>
<th>callNumber</th>
</tr>
</thead>
<?php
$sql = "SELECT * from books";
$query = mysqli_query($conn, $sql);
$counter = 1;
while ($row = mysqli_fetch_array($query)) { ?>
<tbody>
<td><?php echo $row['bookId']; ?></td>
<td><?php echo $row['bookTitle']; ?></td>
<td><?php echo $row['author']; ?></td>
<td><?php echo $row['ISBN']; ?></td>
<td><?php echo $row['publisherName']; ?></td>
<td><?php echo $row['categories']; ?></td>
<td><?php echo $row['callNumber']; ?></td>
</tbody>
<?php }
?>
</table>
</div>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
</body>
</html>