QUOTE(mono @ Mar 6 2008, 11:17 PM) [snapback]471857[/snapback]
QUOTE(Fuzzy Mannerz @ Mar 6 2008, 10:05 PM) [snapback]471837[/snapback]
I gotta turn the server on and I'll let you know cos I have a webpage on there that does just what your after and I'll send you the code your needing. lol :-)
EDIT:
I'll be back in about 5 with the info, bloody servers going all weird on me. lol
sick dude, cheers.
Right I got the code, heres what you need to do....
1. Change the PHP Include code you already have to this:
CODE
<?php
$page = $_GET['page'];
if (! file_exists("$page.php"))
{
include("YOUR-FIRST-PAGE-THAT-WILL-BE-DISPLAYED.php");
}
else
{
include("$page.php");
}
?>
2. All links that you want to open in that space will need to be used like so....
CODE
index.php?page=PAGENAME
"PAGENAME" is the name of the .php page that you want to open in the space where the "YOUR-FIRST-PAGE-THAT-WILL-BE-DISPLAYED.php" is by default.
So for example:
I have the following files that will be linked seperatly to open in the center of my page:
about.php and contact.php
I will make a link on the nav that will look like: "About Me" it will link to "index.php?page=about"
There is also contact.php that I want to open in that space and that will link to "index.php?page=contact"
they will bring up "contact.php" and "about.php" instead of my default page, which in my case is "welcome.php"
EDIT: Forgot to mention if the page is in another directory it would be like so.. "index.php?page=DIRECTORY/PAGENAME" (with no .php at the end just like the others)
Im presuming this is the first page therefore "index.php" but if its something else just change the "index" to the name of the page you currently have.
Let me know how you get on and feel free to ask for any help.
Hope this helps.
Image file not present in the recovered backup