I am trying to modifying a website made in html to php.All php pages are working fine individualyy but not loading in frames.PLz help.....

in what way are they not loading correctly?
do they show anything from the frames at all?

how have you set out the code on the page ? are you using the php html coding or are you using both seperatly

ie
<?php
?>
then html code - or are you using the html code within the php tags?

commented: trying to help +0

I am using php html coding.My code is:
....................................................................

<html>
   <body background="animated_444.gif">
     <pre>
        <table border="1"  width=100%   ALIGN=MIDDLE cellpadding="3" cellspacing="2.5">
<tr>

<th><a href="**link1.html**" target="**frame_c**" style="color: #C0C0C0">Dresses</a></th>
<th><a href="**commentindex.php**" target="**frame_c**" style="color: #C0C0C0"> Comment </a></th>

</tr>
         </table>
      </pre>

   </body>

</html>

.....................................................................
This is the coding of a frame and I m trying to open its links in frame_c.Pages with .html extension are loading but php pages are not loading in frame_c.

Member Avatar for diafol

Ask yourself whether you need frames. Their use is strongly discouraged. You can achieve similar functionality using ajax and maybe iframes.

I need frames thatswhy I am asking the question in this forum.Its in our project and we are bound to use php and html.If any one can guide me how its done then plz help.

Member Avatar for diafol

Ok, in that case, you need to ensure that all php code is help within php files (*.php). Don't try to run php code within *.html files, unless you specifically allow the server to do that - probably not worth it.

I just looked at a frames mockup (haven't used this for over 10 years!! So had to get an online example from here: http://www.quackit.com/html/templates/frames/).

The following worked for me. Here are my files:

ind.html

<html>
<head>
</head>

<frameset rows="100,*" frameborder="0" border="0" framespacing="0">
    <frame name="topNav" src="top_nav.html">
    <frameset cols="200,*" frameborder="0" border="0" framespacing="0">
        <frame name="menu" src="menu_1.html" marginheight="0" marginwidth="0" scrolling="auto" noresize>
        <frame name="content" src="content.html" marginheight="0" marginwidth="0" scrolling="auto" noresize>
    </frameset>
</frameset>
</html>

content.html

<html>
<head>
<title>HTML Frames Example - Content</title>
</head>
<body>
<h1>Content</h1>
<p><a href="trial.php" target="content">open php file here</a></p>
</body>
</html>

nav_1.php

<html>
<head>
<title>HTML Frames Example - Top Nav</title>
</head>
<body>
<h3>Top Navbar</h3>
<p><a href="menu_1.html" target="menu">Menu 1</a> | <a href="menu_2.html" target="menu">Menu 2</a></p>
</body>
</html>

menu_1.html

<html>
<head>
<title>HTML Frames Example - Menu 1</title>
</head>
<body>
<h3>Menu 1</h3>
<p><a href="white.html" target="content">White Page</a></p>

<h4>More Examples:</h4>
<a href="http://www.quackit.com/html/templates/frames/frames_example_1.html" target="_top">Example 1</a><br />
<a href="http://www.quackit.com/html/templates/frames/frames_example_2.html" target="_top">Example 2</a><br />
<a href="http://www.quackit.com/html/templates/frames/frames_example_3.html" target="_top">Example 3</a><br />
<a href="http://www.quackit.com/html/templates/frames/frames_example_4.html" target="_top">Example 4</a><br />
<a href="http://www.quackit.com/html/templates/frames/frames_example_5.html" target="_top">Example 5</a><br />
</body>
</html>

trial.php

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
<p>hello</p>
<p><?php echo "NNNNOOOOO";?></p>
</body>
</html>

The only thing I can think of is that you haven't installed php correctly. You have installed php and have a local server (Apache or IIS) right?

Ok I'll tell u after trying it.Thanks alot for your help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.