Re: off list RE: [PHP] PHP and Frames?
| From: | Jake McHenry | Date: | Mon, 29 Nov 2004 23:39:05 +0000 |
| Subject: | Re: off list RE: [PHP] PHP and Frames? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-203104@lists.php.net to get a copy of this message | ||
----- Original Message ----- From: "Chris W. Parker" <cparker@swatgear.com>
To: "Jake McHenry" <linux@nittanytravel.com>
Sent: Monday, November 29, 2004 6:36 PM
Subject: off list RE: [PHP] PHP and Frames?
Jake McHenry <mailto:linux@nittanytravel.com> on Monday, November 29, 2004 3:30 PM said:I think so, I'll work with it.. and see what I come up with.. thanks for the help.. JakeRight 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.