-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
37 lines (31 loc) · 1.08 KB
/
page.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
<?php include 'inc/header.php' ?>
<?php
$pagesid = mysqli_real_escape_string($db->link, $_GET['pageid']);
if (!isset($pagesid) || $pagesid == null) {
// echo "<script>window.location = 'index.php'; </script>";
header("Location:404.php");
} else {
$pageid = $pagesid;
}
?>
<?php
$pagequery = "SELECT * FROM tbl_page WHERE id = '$pageid'";
$pagedetails = $db->select($pagequery);
if ($pagedetails) {
while ($result = $pagedetails->fetch_assoc()) {
?>
<div class="contentsection contemplete clear">
<div class="maincontent clear">
<div class="about">
<h2><?php echo $result['name']; ?></h2>
<?php echo $result['body']; ?>
</div>
</div>
<?php
}
} else {
header("Location:404.php");
}
?>
<?php include 'inc/sidebar.php'; ?>
<?php include 'inc/footer.php'; ?>