View Single Post
Old 01-08-2009, 07:16 AM   #3 (permalink)
wolf99
Code Monkey
 
wolf99's Avatar
 
Join Date: Jan 2006
Location: jobless (again) in rural Eire
Posts: 54
wolf99 is on a distinguished road
thanks

hey sde

thanks for your help, I was following up on it when I came across a method I think will sit better into the page I have

PHP Code:
Re: n00b include and echo Q
to keep the basic layout of the PHP on your page, you could just have your switch at the beginning of the page, and make variables for the title and include. a quick example:

PHP Code:
<?php
  
switch($_GET['page']){
    case 
"about":
      
$title "About Me";
      
$include "abt.php";
      break;
    case 
"contact":
      
$title "Contact Me";
      
$include "cntct.php";
      break;
    case else:
      
$title "Home";
      
$include "home.php";
  }
?>
<h1><?php echo $title?></h1>
<blockquote>
<?php include($include); ?>
</blockquote>
If ya wan to check the site out: Curriculum Vitae of Toby Mole just a cv site i made to experiment with code and stuff

thanks again
__________________
Current Project
wolf99 is offline   Reply With Quote