Hi, I am a PHP and MYSQL beginner. Recently, I find a problem to use php include function to load a frameset page. (as following index.html(frameset) shows, and this include function has no problem in loading any nonframeset page. (as following index.html(nonframeset)shows.
Can any one view the following code and help me out there?
Thanks very much.
//test.php, this page is to load proper index.html from a list
<html>
<head>
<link href="sales.css" rel="stylesheet" type="text/css">
</head>
<body>
<?
require_once("datacn_fns.php");
$query="select nsid,passwd from nsmember where nsname='$nsname'";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
$nsid=$row["nsid"];
if ($row["passwd"]!==$passwd)
{
?>
<center><h1 align=center><img src="logo.gif"></h1>
<br><br><h3>Emm, the password you typed is not correct, please go back and try again</h3><br>
<input type=button value="Go Back" onClick="history.back()">
</center>
<?
}
else
{
include("./$nsname/index.html");
}
?>
</body>
</html>
//index.html, which has no frameset, and which can be loaded by test.php properly
<html>
<body>
<head>
<title>Home page of NS Members</title>
</head>
<h1 align=center><img src="logo.gif" alt=""></h1>
<h3><a href="../../../index.html.en" target="_top">Home Page </a></h3>
<h3><a href="./nsxchange/index.html">EVN NS Contract Exchange</a></h3>
<H3><a href="./salestest/index.html" >Seeds Division </a></h3>
<H3><a href="./vegetable/index.html">Agriculture Division</a></h3>
<h3><a href="./husbandry/index.html">Husbandry Division</a></h3>
<h3><a href="./forestry/index.html">Forestry Division</a></h3>
<h3><a href="./engineering/index.html">Engineering Division</a></h3>
<h3><a href="./RD/index.html">R & D Division</a></h3>
<h3><a href="./register/index.html">Data Admin </a></h3>
</body>
</html>
//index.html, which has frameset, which could not be loaded by test.php properly, and leave the browser window blank
<html>
<head>
<title>PenningtonPage</title>
</head>
<body>
<frameset border=5 rows="75,">
<!---company Logo--->
<frame src="logo.gif" scrolling=NO marginheight=0 noresize name=logo background="green.gif">
<!---Nested frame--->
<frameset cols="160," border=10 >
<!---List of LGF dabase seeds sales links-->
<frame src="links.html" noresize name=links >
<!--home page of LGF database-->
<frame src="intro.html" marginheight=0 marginwidth=0 noresize name=document >
</frameset>
</body>
</html>