problem with include

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vishnuchinnan
Forum Newbie
Posts: 1
Joined: Thu Mar 26, 2009 4:21 am

problem with include

Post 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 ?
:( :(
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: problem with include

Post 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?
funkyapache
Forum Newbie
Posts: 11
Joined: Tue Mar 24, 2009 11:19 am

Re: problem with include

Post 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?
Post Reply