Just showing you the code for the navbar!
Code:
<?php
$thisfile = $_SERVER['PHP_SELF'];
$thisnumber = filter_var($thisfile, FILTER_SANITIZE_NUMBER_INT);
$prevnumber = $thisnumber - 1;
$nextnumber = $thisnumber + 1;
$prevnumber = str_pad($prevnumber, 3, '0', STR_PAD_LEFT);
$nextnumber = str_pad($nextnumber, 3, '0', STR_PAD_LEFT);
$prevfile = 'ex'.$prevnumber.'.php';
$nextfile = 'ex'.$nextnumber.'.php';
echo '<ul><li><a href="">Home</a></li>';
if (file_exists($prevfile))
{
echo '<li><a href="'.$prevfile.'">Previous</a></li>';
}
else
{
echo '<li>Previous</li>';
}
echo '<li><a href="http://www.heistnightgames.com/php"> Back </a></li>';
if (file_exists($nextfile))
{
echo '<li><a href="'.$nextfile.'">Next</a></li>';
}
else
{
echo '<li>Next</li>';
}
echo '<li>'.$thisnumber.'</li>';
?>