php navigation or iframes?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
bawla
Forum Contributor
Posts: 116
Joined: Fri Mar 19, 2004 9:15 am

php navigation or iframes?

Post by bawla »

i was wondering which one to use on my new site,

either iframes or a php code like

Code: Select all

<?php
switch($id) { 
default: 
include('main.htm');
break; case "wow":
include('wow.htm');
break; case "tutorials":
include('tuts.htm'); 
break; case "files":
include('downloads.htm'); 
break; case "aboutme":
include('me.htm');
break; case "andsoon":
include('andsoon.htm'); 
} 
?>
if anyone has any better php codes for navigation, please post
litebearer
Forum Contributor
Posts: 194
Joined: Sat Mar 27, 2004 5:54 am

Post by litebearer »

hmmm

I personally like using iframes (my audiences are relatively small and narrowly targeted). It is more a matter, IMHO, of objective and personal preference. The iframes allow me to present a visual appearance more in tune with my objective.
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

i'm more for an include-system, much easier for handling PHP...
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

depends on your site, i think.
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

A Combination of both.. can be fun sometimes.
User avatar
johnperkins21
Forum Contributor
Posts: 140
Joined: Mon Oct 27, 2003 4:57 pm

Post by johnperkins21 »

I'd say it depends. I have a site that uses a combination of both. If you want the individual page to refresh (using a post or header()), it might be better to put in an IFRAME so that it does not interfere with the rest of the page. Just my $.02
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

I would argue strongly in favour of the different includes files. iframes are by no means a widely supported construct. Albeit they are supported by the most widely used browser, using iframes just screams proprietary. Use includes.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

as johnperkins21 said; it is good if you want the page to refresh, like an chat/shoutbox etc..
Post Reply