-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpage.php
More file actions
26 lines (25 loc) · 732 Bytes
/
page.php
File metadata and controls
26 lines (25 loc) · 732 Bytes
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
<?php include 'inc/header.php';?>
<?php
$pageid = mysqli_real_escape_string($db->link, $_GET['pageid']);
if (!isset($pageid) || $pageid == NULL) {
header("Location: 404.php");
} else{
$id = $pageid;
}
?>
<?php
$pagequery = "SELECT * FROM tbl_page WHERE id = '$id'";
$pagedetail = $db->select($pagequery);
if ($pagedetail) {
while ($result = $pagedetail->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';?>