
Jul 25th, 2005, 12:58
|
|
New Member
|
|
Join Date: Jul 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Here is the full code
- Code: Select all
<html>
<head>
<?php echo $handle; ?>
</head>
<BODY>
<?
if (isset($_GET['page'])) $PAGES = $_GET['page'];
else $PAGES = 'blank'; # When no page is being asked for, it will default to home. See below!
switch ($PAGES)
{
// Blank
case 'blank':
include ('main.php');
$handle = implode('', file('main.txt'));
break;
// Main page
case 'main':
include ('main.php');
$handle = implode('', file('main.txt'));
break;
// About us
case 'aboutus':
include ('aboutus.php');
$handle = implode('', file('aboutus.txt'));
break;
// Our Products
case 'ourproducts':
include ('ourproducts.php');
$handle = implode('', file('ourproducts.txt'));
break;
// Contact Us
case 'contactus':
include ('contactus.php');
$handle = implode('', file('contactus.txt'));
break;
// Form
case 'form':
include ('form.php');
$headtext = fopen("form.txt", "r");
$handle = implode('', file('form.txt'));
break;
// Intro
case 'intro':
header("Location: intro.php");
$handle = implode('', file('intro.txt'));
break;
// Catalogue
case 'catalogue_page_1':
include ('catalogue_page_1.php');
$handle = implode('', file('catalogue.txt'));
break;
default:
include ('main.php');
$handle = implode('', file('main.txt'));
break;
}
?>
</body>
</html>
The problem is that the text of head is not printed because it is before the main php code.
Any help.
|