Re: off list RE: [PHP] PHP and Frames?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message ----- From: "Chris W. Parker" <cparker@xxxxxxxxxxxx>
To: "Jake McHenry" <linux@xxxxxxxxxxxxxxxxx>
Sent: Monday, November 29, 2004 6:36 PM
Subject: off list RE: PHP and Frames?



Jake McHenry <mailto:linux@xxxxxxxxxxxxxxxxx>
   on Monday, November 29, 2004 3:30 PM said:

Right now I only have 1 php file, which is outputing all of the html.
Is there a way I can have that 1 php file output the frame source
page, along with the links, header, and target page? As I said, I
could have the php file output the html to the actual files, but is
there a way I have have all this in 1 php file? That's what I'm
asking I guess....

Oh yeah sure. That's easy.

(mind you, i haven't written a proper frameset in a long time so my tags
might be wrong.)

<?php

echo <<<QQQ
<frameset>

<frame name="header" ... />
<frame name="nav" ... />
<frame name="content" ... />

</frameset>

QQQ;

?>

You say you want the 'content' frame to load different pages right? Well
then you'll have to pass a value to the frameset page to determine which
page should be loaded.

http://www.yourdomain.com/frameset.php?content=products.pdf

<?php

// Remember to always validate input and
// not blindly display any page like I am
// doing here in my example.
$content_page = $_GET['content'];

echo <<<QQQ
<frameset>

<frame name="header" ... />
<frame name="nav" ... />
<frame name="content" src="$content_page" ... />

</frameset>

QQQ;

?>


Does this help?

Chris.



I think so, I'll work with it.. and see what I come up with.. thanks for the help..

Jake

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux