Free2Code
Tutorials » Browse » Design
Tutorials - Replace Frames with PHP Tables - Just say no, to Frames
This article written by
  OldSite

Member since
  October 11, 2006

Copyright Notice

You are free to distribute this tutorial as long as you give credit to me. This tutorial was originally created for and posted on the 1337net Technologies website.

Introduction

This tutorial describes how I converted my site (1337net Technologies) to tables and gives you a step by step instructions on how to do the same to yours.

When I first created this site it was a simple site, no frames or anything. Later on, when I learned of frames, I thought this would be a wonderful idea, and immediately moved to them (documented in the News area ). After reading a few documents on why not to use frames the site came to be what it is currently. This tutorial will teach you, with the use of PHP, to create a website with tables that looks just like it was created with frames, but with much more flexibility and control.

Just say NO…to Frames

Frames are bad. They create a segmented website that often doesn’t look at all that great. When frames first came out they were a hit, but with scripted programming languages and other advances in web tech they are no longer essential, and they look rather old fashioned. Do you really think highly of a site that uses frames? I don’t. Scripting languages make it much easier to create a nice looking website without the interruption of frames.

Reasons not to use Frames

  • You’re not on Google – Search engines find it hard to navigate through your site, often making them reject your website.
  • Lack of Logic – frames are totally against the logical structure of an HTML document, because in frames, a document alone does not make a page. A frameset has no logical relationship in its document structure because all frames are separate pages.
  • Support – Not all browsers support frames, which often leads them to be stuck with the content in the noframes tag
  • Navigation – The web address never changes in the address bar, which confuses some people which navigate with it

Still need more Reasons?

Okay, I’m convinced, now what do I do?

Don’t worry, there is hope for your site. And this hope lies in PHP. What you are going to do is to move your website to tables. You can keep it looking exactly the same as it did when you used frames. You must have 3 things to proceed.

  • Patience – It isn’t going to work the first time, so there’s going to be some troubleshooting.
  • PHP – You must know basic PHP, how to make functions, and display text, very simple stuff.
  • HTML – I assume you know HTML, especially a lot about tables, since you’ll have to use most of the table attributes to format your site to make it look nice.

Continue to Creating the PHP script - index.php »
In this tutorial:
  1. Just say no, to Frames
  2. Creating the PHP script - index.php
  3. Cleaning Things Up - Final Steps
icons