Jump to content

[SOLVED] table breaks


richiec

Recommended Posts

Hey first of it started as a php question, but once that was solved it then became a html problem so i thought it best to close that thread on php help and make a new one here for the new problem.

 

the table code bellow worked fine untill i added an if/else code into it.. since i added that the table now breaks after the first item.

 

you will see what i mean here http://fearedwarlords.dks-gfx.com/items/items.php

 

the code is:

 

if ($_REQUEST["gem"] != NULL){

$i++;

echo "
<tbody><tr>
<td colspan=\"2\" style=\"font-weight: bold; height: 20px; font-size: 10pt; color: rgb(204, 204, 204);\" align=\"left\">$name x $stock</td>
</tr>
<tr>
<td style=\"padding: 2px; font-family: Verdana; font-weight: bold; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"left\" valign=\"top\">
<br>
$hitpoints2 Hit points<br>$attack2 Attack<br>$rage2 Rage per turn<br>$maxrage2 Max Rage<br>$exp2 Experience per turn <br>$rampage2 % Rampage<br>$critical % Critical hit<br>$block % Block <br><br>
</td>

<td style=\"width: 80px; font-family: Verdana; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"center\" valign=\"top\">
<img src=\"$image\" style=\"border: 1px solid rgb(102, 102, 102); margin: 2px;\"></a><br>
<img src=\"http://fearedwarlords.dks-gfx.com/images/gem_green.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gem_blue.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gem_red.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gem_white.jpg\"><br>
<img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><br></td>			
</tr>


</tbody></table></td></tr></tbody></table></center></div>";

} else {

$i++;

echo "
<tbody><tr>
<td colspan=\"2\" style=\"font-weight: bold; height: 20px; font-size: 10pt; color: rgb(204, 204, 204);\" align=\"left\">$name x $stock</td>
</tr>
<tr>
<td style=\"padding: 2px; font-family: Verdana; font-weight: bold; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"left\" valign=\"top\">
<br>
$hitpoints Hit points<br>$attack Attack<br>$rage Rage per turn<br>$maxrage Max Rage<br>$exp Experience per turn <br>$rampage % Rampage<br>$critical % Critical hit<br>$block % Block <br><br>
</td>

<td style=\"width: 80px; font-family: Verdana; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"center\" valign=\"top\">
<img src=\"$image\" style=\"border: 1px solid rgb(102, 102, 102); margin: 2px;\"></a><br>
<img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"><br>
<img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><br></td>			
</tr>


</tbody></table></td></tr></tbody></table></center></div>";

 

Any ideas why it breaks the table after the first item?

Link to comment
https://forums.phpfreaks.com/topic/62550-solved-table-breaks/
Share on other sites

Thats just it though, it all echos from mysql db and before i added the if/else command for the gems the table worked fine it only pulls the table info once from the php code which i pasted and it puts each one into a new line.. i know it works because it displays the first item corectly its just suposed to display the others under it insted of outside the table..

Link to comment
https://forums.phpfreaks.com/topic/62550-solved-table-breaks/#findComment-311354
Share on other sites

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.