<?php
include("db.php");

$slug=$_GET['slug'];

$page=mysqli_fetch_assoc(mysqli_query($conn,
"SELECT * FROM pages WHERE slug='$slug' AND status=1"));

?>

<h1><?php echo $page['title']; ?></h1>

<div>
<?php echo $page['content']; ?>
</div>