-
Notifications
You must be signed in to change notification settings - Fork 116
/
faq.php
58 lines (50 loc) · 2.2 KB
/
faq.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
<?php require_once('header.php'); ?>
<?php
$statement = $pdo->prepare("SELECT * FROM tbl_page WHERE id=1");
$statement->execute();
$result = $statement->fetchAll(PDO::FETCH_ASSOC);
foreach ($result as $row) {
$faq_title = $row['faq_title'];
$faq_banner = $row['faq_banner'];
}
?>
<div class="page-banner" style="background-image: url(assets/uploads/<?php echo $faq_banner; ?>);">
<div class="inner">
<h1><?php echo $faq_title; ?></h1>
</div>
</div>
<div class="page">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="panel-group" id="faqAccordion">
<?php
$statement = $pdo->prepare("SELECT * FROM tbl_faq");
$statement->execute();
$result = $statement->fetchAll(PDO::FETCH_ASSOC);
foreach ($result as $row) {
?>
<div class="panel panel-default">
<div class="panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-parent="#faqAccordion" data-target="#question<?php echo $row['faq_id']; ?>">
<h4 class="panel-title">
Q: <?php echo $row['faq_title']; ?>
</h4>
</div>
<div id="question<?php echo $row['faq_id']; ?>" class="panel-collapse collapse" style="height: 0px;">
<div class="panel-body">
<h5><span class="label label-primary">Answer</span></h5>
<p>
<?php echo $row['faq_content']; ?>
</p>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
<?php require_once('footer.php'); ?>