Sorry if this post is in the wrong area, It seems like the correct one.
Currently on a project but I seem to have run into a problem. I am still rather new at PHP, learning by the day. Well here is my problem.
I have created an index.php file[see below] that will gather pages to show in the body of the site with a set header and footer. On first load of the site, it does not gather the body text file, untill you click a link.
For example. If I load the site, It only shows the header and footer and no body [home.php] but if I click a link for home.php it will load it in the body.
Here's the code.
Code: Select all
<?php
$cmd = $_GET['cmd'];
if ($cmd=="") { $cmd="home.php"; }
@include('header.php');
switch($cmd)
{
case "home":
@include('home.php');
break;
case "login":
@include('login.php');
break;
case "register":
@include('register.php');
break;
}
@include('footer.php');
Code: Select all
$cmd = $_GET['cmd'];
if ($cmd=="") { $cmd="home.php"; }Thanks
-Dan