Forum Moderators: coopster

Message Too Old, No Replies

php include file

Messing up layout of page.

         

adamnichols45

7:04 pm on Apr 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I dont understand why my php code is doing this.

I have a nicely centered webpage but when i include php script via php include it throws the page off to the right.

Can anybody explain this?

vacorama

7:16 pm on Apr 7, 2006 (gmt 0)

10+ Year Member



do you have any code?

adamnichols45

8:01 pm on Apr 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The code is far to long

adamnichols45

8:13 pm on Apr 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i have cut the code down to below.

<html>
<head>
<title>Prague - all about Prague.</title>
</head>
<body bgcolor="ffffff">
<table cellpadding="0" cellspacing="0" width="100%" border="1">
<tr>
<td>&nbsp;</td>
<td width="700" bgcolor="#ffffff" align="center">
<table width="570" border="1">
<tr>
<td class="content" bgcolor="aabbcc"><?

// load user settings

require("user.inc.php");

// a suggested mechanism for switching the moderator privileges on

$pword = "123"; // my moderator password
if ($_REQUEST['password'] == $pword) // check if password supplied by query or post
$comment_mod = true; // password supplied, moderator privileges on
else
$comment_mod = false; // no password, moderator privileges off

// general config of comment script

$add_comments = true; // display comment box on page
$comment_file = $comment_folder."/comments_file.txt"; // save comments in this file

// include comment script

include("comment.php");

?></td>
</tr>
</table>
</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>

coho75

8:28 pm on Apr 7, 2006 (gmt 0)

10+ Year Member



Is there any html or css code inside either of the two included files? If there is, this could be the cause of the layout problems.

adamnichols45

9:08 pm on Apr 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



none that i can see would cause a problem