RE: Create table & fake frames using PHP
by Klaas De Waele <klaas(at)grace.be>
|
| Date: |
Tue, 19 Nov 2002 14:27:13 +0100 |
| To: |
hwg-techniques(at)hwg.org |
| |
todo: View
Thread,
Original
|
|
what you want to actually use is the include command:
<? include ('navi.php'); ?>
if you want to work with variables, you can for example pass something =
along
with the URL:
yourpage.php?content=3Dfaq
and in that page:
if ($content =3D=3D "faq" ) {
include ('faq.php');
}
but a select case statement (switch) in that page would be better:
switch ($content) {
case "faq":
include ('faq.php');
break;
case "help":
include ('help.php');
break;
case "pictures":
include ('pictures.php');
break;
}
Although doing it the other way round is better in terms of URL use:
your link goes to a specific page and in there, you have this:
<?
include ('header.php');
include ('navi.php');
?>
actual content
<?
include ('footer.php');
?>
I'm using the first principle (so actually just one single page that =
serves
the whole site - very good for effici=EBnt server caching and easy to =
maintain
as all is in one single page) in this website:
www.fccuk.org
The second principle is more widely used on larger sites, but you can =
also
make a comination of the two, so skipping the 'switch' or 'if ... =
elseif
...' structure in favour of many pages and clear obvious urls.
Good luck,
- Kayjey -
www.fiatcoupe.net
-----Original Message-----
From: Philip Drew [mailto:cybertech(at)esatclear.ie]
Sent: Tuesday, November 19, 2002 11:18 AM
To: hwg-techniques(at)hwg.org
Subject: Create table & fake frames using PHP
Hi All,
I am trying to design my new website in PHP and I have two problems if
anyone
can help me or point me in the right direction I would appreciate it.
1) I am trying to create a html table in php & call data into one of =
the
cells
like:
_______________________________
Banner |
_______________________________
Navigation Menu |
_______________________________
Links | Content |
| |
| |
| |
| |
_______________________________|
I would ideally like to use this and call a link from the links cell to =
put
content into the content box. This is so it will look like frames but =
not
actually
be frames.
I have seen a command like index.php?display=3Dcontent1 but don't know =
quite
how
to achieve this and searching the web hasn't helped much.
Many thanks in advance,
Philip
Philip Drew=20
--
http://www.iol.ie
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.