-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview.php
37 lines (34 loc) · 1.1 KB
/
view.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
<?php
require("partials/header.php");
require("connection.php");
$query = $conn->prepare("SELECT * FROM books Where id=:id");
$query->execute(['id' => (int)$_GET["id"]]);
$result = $query->fetch();
?>
<h1 class="mt-4 px-5">View Book</h1>
<div class="mt-3 px-5">
<a href="index.php" class="btn btn-primary">Back</a>
</div>
<div class="container border bordered mt-4">
<form action=".php" method="post">
<div class="form-field my-4">
<h3>Title:</h3>
<p class=""><?php echo $result['title']; ?></p>
</div>
<div class="form-field my-4">
<h3>Author:</h3>
<p><?php echo $result['author']; ?></p>
</div>
<div class="form-field my-4">
<h3>Publication Year:</h3>
<p><?php echo $result['publication_year']; ?></p>
</div>
<div class="form-field my-4">
<h3>Isbn:</h3>
<p><?php echo $result['isbn']; ?></p>
</div>
</form>
</div>
<?php
require("partials/footer.php")
?>