Jump to content

**SOLVED** Can't figure out why my output is comming out wrong


OriginalSunny

Recommended Posts

Hi,
I am working on a webpage and can't seem to figure out why my output is comming out half way down the page. My [b].php[/b] file reads in the [b].inc[/b] file which contains the following coding:

<form action="order_form.php?do=new" method="POST">
<?php
if (isset($message_new))
echo "<tr><td colspan='2'><b>$message_new</b>
</td></tr>";
?>

<table border="0" cellpadding="5" cellspacing="0">

<tr><td align="right"><b>Title</b></td>
<td><input type="text" name="title"
value="<?php echo @$title ?>"
size="10" maxlength="10"></td></tr><br><br>

<tr><td align="right"><b>Surname</b></td>
<td><input type="text" name="surname"
value="<?php echo @$surname ?>"
size="30" maxlength="30"></td></tr><br><br>

..........

<tr><td align="center" colspan="2">
<input type="submit"
value="Submit"></td></tr>

</table>

I am fairly confident that the php file is not causing this problem. Can anyone see why it is doing this??
Its not that because when i get rid of echo"..$messagenew.." it doesnt make any difference. The only time it makes a difference is when i get rid of


<table border="0" cellpadding="5" cellspacing="0">

But i need the table to display the info in the correct places. I dont see anything wrong with my table command.
try changing:
[code]
<tr><td colspan='2'><b>$message_new</b>
</td></tr>[/code]

to just this:
[code]<b>$message_new</b>[/code]

unless "<b>$message_new</b>" is suposed to be set within the table, in which case its in the wrong place, seems to be that its creating 2 colums of an unset size so its just making them huge :/
Anything within <table>...</table> that isn't inside a cell will be output above the table.

In your case you have several <br> placed outside table cells. Remove them.

EG

<tr><td align="right"><b>Title</b></td>
<td><input type="text" name="title"
value="<?php echo @$title ?>"
size="10" maxlength="10"></td></tr>[!--coloro:#FF6666--][span style=\"color:#FF6666\"][!--/coloro--]<br><br>[!--colorc--][/span][!--/colorc--]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.