-
Notifications
You must be signed in to change notification settings - Fork 0
/
activity2.php
121 lines (88 loc) · 2.69 KB
/
activity2.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<html lang="en">
<head>
<?php
/// Auto Restart Page after every 10 Sec
$url=$_SERVER['REQUEST_URI'];
header("Refresh: 600; URL=$url");
?>
<title>My Activity</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bootstrap.min.css">
<script src="jquery.min.js"></script>
<script src="bootstrap.min.js"></script>
<style>
.navbar-nav li a:hover {
color: #1abc9c !important;
}
.navbar {
padding-top: 15px;
padding-bottom: 15px;
border: 0;
border-radius: 0;
margin-bottom: 0;
font-size: 16px bold;
letter-spacing: 5px;
}
.container {
padding: 2px 16px;
}
</style>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-default navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="mrgreen.php">Me</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="mrgreen.php#who">WHO</a></li>
<li><a href="mrgreen.php#what">WHAT</a></li>
<li><a href="mrgreen.php#where">WHERE</a></li>
<li><a href="activity.php">ACTIVITY</a></li>
<li><a href="cv.php">ABOUT ME</a></li>
</ul>
</div>
</div>
</nav>
<div class="row" style="margin-left:80px; margin-right:30px";>
<?php
if(isset($_GET['id']))
{
$DBconnect = mysqli_connect("localhost","root","","blog");
//getting value from url and store it to a variable
$ID = mysqli_real_escape_string($DBconnect, $_GET['id']);
// getting data according to that id
$sql = "SELECT * FROM image WHERE id='$ID'";
$result = $DBconnect->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
$img = $row["img"];
$title = $row["imgname"];
$imagedetails = $row["imagedetails"];
// echo $img;
}
}
}
else
{
header('Location: activity.php');
}
?>
<p><h1 align="center"><?php echo $title ; ?></h1></p>
<div class="card" >
<p align="center"><?php echo "<br><br><img src='$img' alt='$title' class='gallery' height='550px' width='520px' > <br>"; ?>
</p>
<?php echo " <br><p> $imagedetails </p><br><br>"; ?>
</div>
</div>
</body>
</html>