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??
Link to comment
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.
Link to comment
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 :/
Link to comment
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--]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.