your site is looking nice, its very dynamic and has a unique phpbb theme. ur lucky you got help with ur website, i was a noob and had to do everything by myself but i commend you for your effort, i also notice your pages are incomplete(ie:broken links) but im guessing its cuz you have to copy and paste your layout like a kagillion times. thats ok i know how tedious it gets. use thies code:
<?
$val = $_GET['page'];
$val .= ".php";
$dirty = array("..");
$clean = array("");
$val = str_replace($dirty, $clean, $val);
if (isset($_GET['page'])) {
if (file_exists($val)) {
include "$val";
}
else {
include "404.php";
}
}
else {
include "main.php";
}
?>
to use:first paste this html where you want the content to appear, then just change the content.
but b4 you do that you need a good old fashion break down of the code:
<?
so obviously makes the code
$val = $_GET['page'];
creates the value 'page'(can be named 'id' or something i just prefer page)
ex:www.domain.com/index.php?page=xxx
$val .= ".php";
the value of yourr extension, in this one it uses ".php" im gonna assume that cuz you have cute news on your site, you can change it to html if you use .html documents. anyways it makes the extension so if you go ?page=graphics , it will be graphics.php it has to look for.
$dirty = array("..");
$clean = array("");
creates to arrays later used.
$val = str_replace($dirty, $clean, $val);
this is when these are checked as to prevent hacking(die hackers die!)
if (isset($_GET['page'])) {
gets the code and uses 'page'
if (file_exists($val)) {
checks if file exists
include "$val";
}
if it exists you can now use
www.domain.com/index.php?page=xxxelse {
include "404.php";
}
}
if nothing exists, it includes your custom 404.php error page
else {
include "main.php";
}
?>
is it does exist with no errors and there is no page present, includes 'main.php' as a default. you can of course change this ex:
else {
include "main.php";
}
?>
changed to:
else {
include "home.php";
}
?>
make sure home.php exists on the same server.
to make new pages:
since 'main.php' is your default you just have to design that.
now to addmore pages do this. ex: you make a new php/html document called graphics.php . upoad it to the same server(usually 'public_html' on payed servers) and to link it use the link
http://www.domain.com/index.php?page=graphics
or use the code:
<a href='http://www.domain.com/index.php?page=graphics'>Graphics</a>
i hope this code proved sufficient in hopes of making site navigation easier for you and i apologize if you are unfaniliar with html/php but to understand this you need at least some basic knowlege on the subject.
PLease note that your file extensions must be .php for this to work