| | |
Error with tables overlapping
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2005
Posts: 12
Reputation:
Solved Threads: 0
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">
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
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">
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
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]
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]
•
•
Join Date: Jun 2005
Posts: 12
Reputation:
Solved Threads: 0
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
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
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?
Try it without any PHP -- just HTML. Does the problem still exist?
![]() |
Similar Threads
- Internal Data Tables (Visual Basic 4 / 5 / 6)
- Loing authentication fields from 2 tables? (ASP)
- updating 2 HTML tables on one PHP page (PHP)
Other Threads in the PHP Forum
- Previous Thread: Function Problem. Please help
- Next Thread: help with javascript (moved from javascript forum)
| Thread Tools | Search this Thread |
advanced alerts apache api archive array autosuggest beginner binary broken cakephp checkbox class clients cms code cron curl database date display dynamic echo email emptydisplayvalue eregi error execute explodefunction file files folder form forms function functions google hack href htaccess html if...loop image include insert ip javasciptvalidation javascript joomla keywords library limit link login mail matching menu mlm multiple mysql object oop password paypal pdf php phpincludeissue problem query radio random recursion recursive remote script search searchbox server sessions shot smarty sms source space speed sql syntax system table tutorial update upload url validator variable vbulletin video web website youtube





