-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewBibliographyDetails.php
82 lines (65 loc) · 1.99 KB
/
viewBibliographyDetails.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
<?php
require_once "login.php";
try{
$pdo=new PDO($attribute, $user, $password);
// echo "Lidhja u krye me sukses <br>";
}
catch(PDOException $e)
{
echo "Lidhja nuk u krye, ndodhi nje gabim $e->getMessage() dhe ka nr $e->getCode()";
}
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Bibliography Details</title>
<link rel="stylesheet" href="mainStyling.css">
</head>
<body>
<div id="general">
<header>
<h1>Bibliography</h1>
<nav>
<ul>
<li><a href="index.php"class='actualPosition'>Home</a></li>
<li><a href="searchBibliography.html" >Search Items</a></li>
<li><a href="#">Log In</a></li>
<li><a href="#">Add New Items</a></li>
</ul>
</nav>
</header>
<section class="">
<?php
$id=$_POST['id'];
$query= "SELECT ID,imageURL, caption, title, author, yearPublication, publisher,edition,briefContent FROM bibliographies
WHERE ID=$id";
if(!$result=$pdo->query($query))
echo "gabim ne query";
else {
$row=$result->fetch(PDO::FETCH_BOTH);
?>
<article class="">
<figure>
<img src='images\<?php echo $row["imageURL"]; ?>' alt='<?php echo $row["caption"]; ?>'>
<figcaption><?php echo $row["caption"];?></figcaption>
</figure>
<hgroup>
<h3>Title:<?php echo $row["title"];?> </h2>
<h3>Author:<?php echo $row["author"];?></h2>
<h3>Year of Publication:<?php echo $row["yearPublication"];?></h2>
<h3>Publisher:<?php echo $row["publisher"];?></h2>
<h3>Edition:<?php echo $row["edition"];?></h3>
</hgroup>
<p><?php echo $row["briefContent"];?>
</p>
</article>
</section>
<?php
}
$pdo=null;
?>
<footer>©2022 Bibliography</footer>
</div><!-- end of div general -->
</body>
</html>