That's pretty much what I'm doing today, header page, menu page, content
page and a footer. Each of which includes a shared functions file as
well via require_once(). Only real problem is keeping track of
tables/rows/columns across all the various files. The 'where was that
<tr> supposed to be...' kind of thing.

Here's another one, there's no way to set a cookie after the headers
have been sent, true? Any way around this at all or at that point am I
best to use session variables and/or hidden fields.

I haven't done pure web development in a few years and am trying to
catch back up quickly. Any "best practices" assistance would be
appreciated.

Thanks for the response by the way.

/DAY

-----Original Message-----
From: Justin French [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 13, 2003 5:22 PM
To: Darren Young; [EMAIL PROTECTED]
Subject: Re: [PHP] Templates


Go for a complex situation if that's what you want, or consider the
basics:

home.php
<?
include('inc/header_code.php');
//
// unique code for this page to be executed before the <html> tag //
include('inc/header_html.php'); ?> Welcome to our website! <?
include('inc/footer.php'); ?>

contact.php
<?
include('inc/header_code.php');
//
// unique code for this page to be executed before the <html> tag //
include('inc/header_html.php'); ?> Contact us: [EMAIL PROTECTED] <?
include('inc/footer.php'); ?>


If you update any code in any of the 3 include files, you will update
the entire site's look, feel and actions.  It still allows for you to
execute unique PHP code either before or after the HTML starts too.


Strip your site down to what's common, and what's unique to each page,
and see where you go from there.


Justin


on 14/02/03 10:00 AM, Darren Young ([EMAIL PROTECTED]) wrote:

> 
> I'm looking around for some options on using templates with PHP. I've 
> used several Perl solutions in the past, but never tried it in PHP. 
> Digging on the web yields several options so I'd love some thoughts or

> comments. The real driver is that the basic site design could change 
> over time and I'd like to have the basic HTML in the templates, and 
> the real logic in the PHP code.
> 
> Thanks in advance,
> 
> Darren Young
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to