Jump to content

Archived

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

OriginalSunny

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

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

Share this post


Link to post
Share on other sites
Could it be that $message_new contains several empty lines?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Do you have a URL where we could look at the results?

Ken

Share this post


Link to post
Share on other sites
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 :/

Share this post


Link to post
Share on other sites
I have tried that and it still makes no difference. The only time it makes a difference is when i get rid of:

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

For some reason the table is created half way down the page.

Share this post


Link to post
Share on other sites
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--]

Share this post


Link to post
Share on other sites

×

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.