943,940 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2350
  • PHP RSS
Jun 28th, 2005
0

Error with tables overlapping

Expand Post »
Hello,

I have just begun recoding my site and whenever i use PHP to put data on a page via an IF statement it overlaps any cells that are below it, and it also seems to be extending my left menu to the right.

The left menu works when logged in, but when not logged in it extends to the left. And throughout my site the tables overlap when an if statement is used.

My Website (on temp host lol)


And here is an extract of the code that runs the second menu on the left:
[PHP]<TR><TD background="images/index_07.gif" width="120" height="16" class="titlecontent">
&nbsp;&nbsp;&nbsp;&nbsp;Members</TD>
</TR><TR><TD class="leftcontent">
<?PHP
if($_SESSION['ID']) {
echo "Hello ".$_SESSION['Username']."!!<BR>Welcome<p><A HREF=\"?p=logout&r=home\">Logout</A>";
} else {
echo "
<form name=\"login\" method=\"POST\" action=\"?p=login&a=1&r=".$p."\">
User:<br>
<input type=\"text\" name=\"User\" id=\"User\" size=\"12\" class=\"menuinput\"><br>
Password:<Br>
<input type=\"password\" name=\"Pass\" id=\"Pass\" size=\"12\" class=\"menuinput\"><br>
<input type=\"Submit\" name=\"Submit\" value=\"Login\">
</form>";
}
echo '</TD></TR><TR><TD>
<IMG src="images/index_08.gif" width="120" height="16" alt=""></TD></TR>
</TABLE>
</TD>'; ?>
<TD width="10">
<IMG src="images/spacer.gif" width="10" height="10" alt=""></TD>[/PHP]

Thanks

/Knad
Similar Threads
Reputation Points: 23
Solved Threads: 0
Newbie Poster
Knad is offline Offline
12 posts
since Jun 2005
Jun 28th, 2005
0

Re: Error with tables overlapping

What you describe sure sounds strange, and I wish I could see your site so I'd know what you are talking about, but the link you provided is not working.

You said it works when user is logged in--that the problem occurs when user is NOT logged in. So, let's point the finger at your FORM. Try doing this...this is a stab in the dark....
[php]
"<form style=\"margin:0px;padding:0px;\" name=\"login\" method=\"POST\" action=\"?p=login&a=1&r=".$p."\">"
[/php]
Reputation Points: 36
Solved Threads: 6
Posting Whiz
Troy is offline Offline
354 posts
since Jun 2005
Jun 29th, 2005
0

Re: Error with tables overlapping

Hello

Updated Link - works for me and shows overlapping on main page

I have tried the code you suggested, but it doesnt work any more help would be greatly appreciated as that is happening on all pages i make.

Thanks

/Knad
Attached Files
File Type: php index removed pass.php (4.3 KB, 9 views)
Reputation Points: 23
Solved Threads: 0
Newbie Poster
Knad is offline Offline
12 posts
since Jun 2005
Jul 3rd, 2005
0

Re: Error with tables overlapping

any help guys? this really bugging me...i found out its only when i use forms
Reputation Points: 23
Solved Threads: 0
Newbie Poster
Knad is offline Offline
12 posts
since Jun 2005
Jul 4th, 2005
0

Re: Error with tables overlapping

Please build a page that is as simple as possible that displays this issue. Can you create a table with only 2 columns with a form in one that creates this problem? If so, post that code so I can look at it. As it is, I can't tell what you expect the page to look like.

Try it without any PHP -- just HTML. Does the problem still exist?
Reputation Points: 36
Solved Threads: 6
Posting Whiz
Troy is offline Offline
354 posts
since Jun 2005
Jul 4th, 2005
0

Re: Error with tables overlapping

I usually do trial and error with something like that.
Why don't you view the source code of the sign in page before you log in
and view again after you log in. Compare the codes, you might find a slight difference. That might help, Hope that helps. I am not too good with php... :o
Reputation Points: 10
Solved Threads: 0
Light Poster
Yuki H. is offline Offline
26 posts
since May 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Function Problem. Please help
Next Thread in PHP Forum Timeline: help with javascript (moved from javascript forum)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC