-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
159 lines (138 loc) · 5.54 KB
/
index.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?php
/**
* Created by PhpStorm.
* User: Adnan
* Date: 2/27/2020
* Time: 8:09 PM
*/
/*db connection created once in config.php*/
include("config.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web developer Test</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<!--Font Awsome-->
<link href="css/fontawsome.css" rel="stylesheet">
<!--Font popins-->
<link href="https://fonts.googleapis.com/css?family=Poppins&display=swap" rel="stylesheet">
<!--Custom Style-->
<link href="css/style.css" rel="stylesheet">
<link href="css/responsive.css" rel="stylesheet">
</head>
<body>
<!-- Header -->
<header>
<nav class="navbar navbar-expand-lg navbar-dark navbgdark ">
<div class="container">
<a class="navbar-brand" href="">Adnan Hyder Pervez</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse"
aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse navbgdark" id="navbarCollapse">
<ul class="navbar-nav ml-auto">
<li class="nav-item ">
<a class="nav-link"
href="https://docs.google.com/document/d/1L-o3XUnhfV7YSXOzW_Rgg1G3zyDr8fBOjaB93xfAABY/edit">Portfolio</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://wordpress.org/plugins/techopialabs-backups/">MY WP PLUGIN</a>
</li>
<li class="nav-item">
<a class="nav-link " href="https://blog.helpyea.com" id="reg_opoc">MY Blog</a>
</li>
<li class="nav-item">
<a class="nav-link" id="log_opoc" href="mailto:[email protected]">Contact Me</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<!-- End Of Header -->
<!--content-->
<div class="container">
<section class="service-sec" id="benefits">
<div class="row">
<div class="col-md-12">
<div class="heading p-5">
<h2>
<small>Welcome</small>
Select The User From Dropdown to Fetch Posts
</h2>
</div>
</div>
</div>
</section>
<?php
$sql = "SELECT id, first_name, last_name FROM user_info";
$result = $conn->query($sql);
?>
<div class="col-lg-12">
<div class="form-group">
<label for="UserPost">Fetch Post</label>
<select class="form-control" id="UserPost">
<option>Select User</option>
<?php
if ($result->num_rows > 0) {
// output data of each row
while ($row = $result->fetch_assoc()) {
?>
<option value="<?php echo $row["id"] ?>"><?php echo $row["first_name"] . " " . $row["last_name"] ?> </option>
<?php
}
}
?>
</select>
</div>
</div>
</div>
<!--closing db connection-->
<?php
$conn->close();
?>
<div class="container">
<div class="col-md-12">
<div class="loader" style="display: none"></div>
<div class="mainposting">
<div class="posting">
<h1>Alice in Wonderland, part dos</h1>
<p>'You ought to be ashamed of yourself for asking such a simple question,' added the Gryphon; and then
they
both sat silent and looked at poor Alice, who felt ready to sink into the earth. At last the Gryphon
said to
the Mock Turtle, 'Drive on, old fellow! Don't be all day about it!' and he went on in these words:
'Yes, we went to school in the sea, though you mayn't believe it—'
'I never said I didn't!' interrupted Alice.
'You did,' said the Mock Turtle.</p>
<hr>
</div>
<div class="posting">
<h1>Revolution has begun!</h1>
<p>'I am bound to Tahiti for more men.'
'Very good. Let me board you a moment—I come in peace.' With that he leaped from the canoe, swam to
the
boat; and climbing the gunwale, stood face to face with the captain.
'Cross your arms, sir; throw back your head. Now, repeat after me. As soon as Steelkilt leaves me, I
swear
to beach this boat on yonder island, and remain there six days. If I do not, may lightning strike
me!'A
pretty scholar,' laughed the Lakeman. 'Adios, Senor!' and leaping into the sea, he swam back to his
comrades.</p>
<hr>
</div>
</div>
</div>
</div>
<!--end of content-->
<!-- Bootstrap core JavaScript -->
<script src="js/jquery.slim.min.js"></script>
<script src="js/jquery.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>
<!--Custom Js-->
<script src="js/custom.js"></script>
</body>
</html>