MySQL
  Home arrow MySQL arrow Implementing a Template Based Web Site Wit...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MYSQL

Implementing a Template Based Web Site With PHP
By: James Crowley
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2002-04-09

    Table of Contents:
  • Implementing a Template Based Web Site With PHP
  • Templates in a database
  • Templates in a folder
  • The PHP Code
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Implementing a Template Based Web Site With PHP


    (Page 1 of 5 )

    Template based web sites allow you to produce dynamic web content and give your visitors the appearance that each page on your site is different. In this article James shows us how to implement a template based web site using two methods: a MySQL database and a flat file approach.

     

    This article was contributed by James Crowley from DeveloperFusion.com. If you're after free programming tutorials, source code and reviews you can click here




    A common requirement when designing a site is the ability to update the layout and HTML of the site without having to change the look and feel of every page on your web site. Template based web sites allow you to produce dynamic web content and give your visitors the appearance that each page on your site is different. Another advantage of a template based web site is that PHP and HTML code can be kept entirely separate, making for far more logical HTML and PHP coding. There are a number of ways to do this, and this tutorial covers just one method with 2 storage options: templates in a database and templates in a directory.

    To test the templates in this article you should have PHP and MySQL installed on either a Windows or Linux server. You should also have an intermediate knowledge of PHP and MySQL, including how to create tables, etc.

    More MySQL Articles
    More By James Crowley


     

    MYSQL ARTICLES

    - MySQL and BLOBs
    - Two Lessons in ASP and MySQL
    - Lord Of The Strings Part 2
    - Lord Of The Strings Part 1
    - Importing Data into MySQL with Navicat
    - Building a Sustainable Web Site
    - Creating An Online Photo Album with PHP and ...
    - Creating An Online Photo Album with PHP and ...
    - PhpED 3.2 – More Features Than You Can Poke ...
    - Creating An Online Photo Album with PHP and ...
    - Creating An Online Photo Album with PHP and ...
    - Security and Sessions in PHP
    - Setup Your Personal Reminder System Using PHP
    - Create a IP-Country Database Using PERL and ...
    - Developing a Dynamic Document Search in PHP ...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT