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.
What about the links? what do I assign the frame src of the links to if the php file is generating the output?
right now the php file is generating the links, I want to turn that into frames, but all in one php file. So if I put the frame src before the html output that I have now, how can I output the links in the same php file? and the header? I get what you said about the target frame, but not sure how I'm going to get the output into the right frames. It's been a long day, maybe I'm just not seeing this right?
Thanks,
Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com
(570) 748-6611 x108
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php