Newbie: How to insert html into table from an included page
Posted: Mon Jan 05, 2004 12:12 pm
Hi,
I am building a site in php for the first time.
I have a set template and this is included in every page for the site. However there are two areas within this template that need to be changed for each page.
at the moment I am using including a variable which is defined as the location of the content in the file:
sofor the file index.php...
its $topContent is content/index-top.php
and its $mainContent is content/index-main.php
each bit of content is stored in a different file in the content folder and the actual index.php file is just:
I don't think this is the best mothod by a long way and I want to be able to use a cms like contribute to update the site. Ideally all the html for a page would be held on that page.
any help would most appreciated. The actual site can be viewed at:
http://www.florida-familyvillas.com
thanks
ash
[Edit: Added PHP tags for eyecandy. --JAM]
I am building a site in php for the first time.
I have a set template and this is included in every page for the site. However there are two areas within this template that need to be changed for each page.
at the moment I am using including a variable which is defined as the location of the content in the file:
sofor the file index.php...
its $topContent is content/index-top.php
and its $mainContent is content/index-main.php
each bit of content is stored in a different file in the content folder and the actual index.php file is just:
Code: Select all
<?php
$pageTitle = "Florida Family Villas - A Beautiful Villa in a Perfect Location";
$finalTrailItem = "home";
$topContent = "content/index-top.php";
$mainContent = "content/index-main.php";
include 'codeLibrary/include_fns.php';
?>any help would most appreciated. The actual site can be viewed at:
http://www.florida-familyvillas.com
thanks
ash
[Edit: Added PHP tags for eyecandy. --JAM]