-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathanswers_list.php
56 lines (42 loc) · 1 KB
/
answers_list.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
<?php
include_once("header.php");
require 'db.php';
$sql = 'SELECT * FROM chatbot';
$q = $conn->query($sql);
$q->setFetchMode(PDO::FETCH_ASSOC);
$data = $q->fetchAll();
?>
<header class="masthead" style="background-image: url('img/about-bg.jpg')">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<div class="page-heading">
<h1>Added questions</h1>
<span class="subheading">List of Questions</span>
</div>
</div>
</header>
<div class="container" id="container">
<?php $num = 1;?>
<table class="table table-bordered">
<thead>
<tr>
<th>S/N</th>
<th>Question</th>
<th>Answer</th>
</tr>
</thead>
<?php foreach ($data as $key) { ?>
<tr>
<td><?=$num ?></td>
<td><?=$key["question"] ?></td>
<td><?=$key["answer"] ?></td>
</tr>
<?php $num++;?>
<?php } ?>
</table>
</div>
<?php
include_once("footer.php");
?>