Page 1 of 1

problem with include

Posted: Thu Mar 26, 2009 4:33 am
by vishnuchinnan
I am new to php. I have included two php pages in one page. The source of the resultant page looks like this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>USER HOME TCE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>USER HOME TCE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="gmenu.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="gmenu.js" ></script>
</head>
<body>
<table>
<tr><td>
<center><img src="images/banner.jpg" height="100px" width="900px"></center>
</td></tr>
<tr><td>
<script type="text/javascript" src="jsmenu.js"></script>

</td></tr>
</table>
</body>
</html>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Search home</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" >
<tr>
<td width="29%" height="100%">

<iframe name="searchleft" src="searchleft.php" width="100%" scrolling="no" frameborder="0" height="500" ></iframe>
</td>
<td width="65%">
<iframe name="searchtask" src="searchres.php?start=1" width="100%" scrolling="no" frameborder="0" height="500" ></iframe>
</td>
</tr>
</table>

</body>
</html>

</body>
</html>

Will there be any problem due to the multiple <html><body> tag's in the same page ?
:( :(

Re: problem with include

Posted: Thu Mar 26, 2009 4:40 am
by requinix
Looks like three pages to me.

You can't just combine pages together. It doesn't make sense.
There may be problems, there may not be. And the best part is, you can't really know for sure what the problems may even be.

Just do it right, okay?

Re: problem with include

Posted: Thu Mar 26, 2009 5:25 am
by funkyapache
vishnuchinnan

What are your trying to achieve? If some of your parts on your page need to be generic through out your website then you need to cut those sections out and place them within another php file then the pages that your want to include the generic part your just include it.

Example you may have a navigation on all your pages which you put place in a php file and then just include it in all your pages.

Does this mankes sense?