Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 533
0 Users 2 Guests Online
Posted on Monday 12th November 2007 at 02:23 PM
gbt91
templates/default/images/noavatar.png's Avatar
Junior Member
Hi Guys,
I Need your help...
i 'm coding a new site which has an header and a footer, so now i want to know if there's a way different from having the data on a sql table to make a site based on an index page.
index?page=

for more info ask me
Posted on Monday 12th November 2007 at 07:01 PM
SkillMaster
templates/default/images/noavatar.png's Avatar
Senior Member
Easy peasy.. :)

Code

<?
if (isset($_GET['page']) && file_exists(''.$_GET[page].'.php'))
{
include("{$_GET["page"]}.php");
}
else
{
include("home.php");
}
?>

you go index.php?page= whatever page you want to call just without the extension. :) if there is no page it just goes to your home page :)