-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.php
More file actions
31 lines (26 loc) · 891 Bytes
/
page.php
File metadata and controls
31 lines (26 loc) · 891 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
27
28
29
30
31
<?php include 'inc/header.php'; ?>
<?php
$pageid = mysqli_real_escape_string($db->link, $_GET['pageid']);
if (!isset($pageid) || $pageid == NULL) {
//echo "<script>window.location = 'index.php';</script>";
header("Location:404.php");
}else{
$id = $pageid;
}
?>
<?php
$pagequery = "SELECT * FROM table_page WHERE id = '$id'";
$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'; ?>