Jump to content

Php Frame?


KYKK

Recommended Posts

I have a CSS layout, a top menu, sidebar, footer, content... and I have pages, register, login, logout, index... they are PHP pages, but I want to do the same thing like HTML Frame, but without the values of the rows/columns indicate the amount of screen area each row/column will occupy, because I already have CSS...and then It will display php files, register, login, logout in 1 frame. like this here http://www.w3schools.com/html/tryit.asp?fi...rame_navigationbut I find out that it won't display php files in frame. So I have<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>StarGazer by Free CSS Templates</title><meta name="keywords" content="" /><meta name="description" content="" /><link href="star.css" rel="stylesheet" type="text/css" media="screen" /></head><body><frameset> <frame src="logo.php"> <frame src="inmenu.php"><hr /><div id="page"> <frame src="incontent.php"> <!-- end #content --> <frame src="insidebar.php"> <!-- end #sidebar --> <div style="clear: both;"> </div></div><!-- end #page --><hr /><div id="footer"> <p>© 2007 Sitename.com. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p></div></frameset></body></html>I just use <frameset> <frame src="logo.php"></frameset>but not <frameset cols="25%,75%"> but will it still show?and for different php, i have div class, and some html text...

Link to comment
Share on other sites

Instead of using frames, you should look into using $_GET when each link is clicked and changing PHP content based on the user input (may cause some easily fixed security issues).Something like this:

<a href="index.php?page=1"><?phpvar $x = $_GET["page"]; //Gets the user inputif ($x=="1"){echo "Content you want in this frame";}

___If you must use frames you should use the correct doctype.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

Using % values for frames will not display correctly in Firefox I believe. (It will in Chrome)So use a fixed value for the height / width if you can.

Link to comment
Share on other sites

um.. I know what you mean, but my page is php and html stuff so I having a problem doing echo "<?php //some php code ?>";how do i echo some php code?
<a href="index.php?page=1"><?phpvar $x = $_GET["page"]; //Gets the user inputif (x=="1"){echo "Content you want in this frame";//All the PHP code you want goes hereecho $var;}

?You could also look into eval()

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...