-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenid.php
84 lines (71 loc) · 3.13 KB
/
genid.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>K17 Blog</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<link rel="icon" href="/k17blog/img/k.jpg" sizes="16x16" type="image/png">
<body>
<div class="container-fluid">
<nav role="navigation" class="navbar navbar-inverse navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/k17blog/index.php">
<img alt="CEG LOGO" src="/k17blog/img/cegsymbol.png" height="35" width="40" align="left">
</a>
<a class="navbar-brand" href="/k17blog/index.php">k17! Blog</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="/k17blog/index.php"><span class="glyphicon glyphicon-home"></span> Home</a></li>
<!-- <li><a href="#"><span class="glyphicon glyphicon-book"></span> Literature</a></li>
<li><a href="#"><span class="glyphicon glyphicon-facetime-video"></span> Media</a></li>
<li><a href="#"><span class="glyphicon glyphicon-glass"></span> Sports</a></li>-->
<li><a href="/k17blog/insert.html"><span class="glyphicon glyphicon-paperclip"></span> New Post</a></li>
<li><a href="/k17blog/genid.html"><span class="glyphicon glyphicon-refresh"></span> Blog Id</a></li>
<li><a href="/k17blog/searchid.html"><span class="glyphicon glyphicon-search"></span> Search</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="/k17blog/feedback.html"><span class="glyphicon glyphicon-send"></span> Feed Back</a></li>
<li><a href="/k17blog/contact.php"><span class="glyphicon glyphicon-map-marker"></span> Contact Us</a></li>
</ul>
</div>
</nav>
</div>
<br>
<table width="100%">
<tr>
<td><img src="/k17blog/img/cegfinal.png" alt="CEG Logo" height="100" width="200"></td>
<td><p align="center"><img src="/k17blog/img/k17.png" alt="k Logo" height="100" width="275"></td>
<td align="right"><img src="/k17blog/img/unesco.jpg" alt="Unesco Logo" height="100" width="275"></td>
</tr>
</table>
<hr>
<h2 align="center">The Blog Id are</h2>
<?php
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "blog";
// Create connection<div style='text-align:right'><h1>Welcome ". $_SESSION['SESS_FIRST_NAME']."!</h1></div>
$conn = new mysqli($servername, $username, $password,$dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT id,title FROM content";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<div style='text-align:center'><h3> * Blog Id- ". $row["id"]." Title - " . $row["title"]. "</h3></div><br>";
}
} else {
echo "<div style='text-align:center'><h3> No Post Found </h3></div><br>";
}
?>
</body>
</html>