Jump to content

[SOLVED] problem with tables, please help


brem13

Recommended Posts

hey, i have a script to check a mysql database and display 'friends' if there are 'confirmed' friends and to display it in a table. after it displays the table it should have the footer at the bottom but it isnt, its to the right of the table and extends the page to the right. (screenshot below)

 

here is the code and i have the table ending but it doenst seem like it ends the table, any help?

 

if ($result3 = mysql_db_query($database, "select * from $table WHERE confirmed = 'Yes'")) {
           if (mysql_num_rows($result3)) {   
                   echo '<font face=tahoma size=3>My Friends</font><br>';
            echo '<table align=left width=100%><tr>';
            $i = 1;
               while ($qry = mysql_fetch_array($result2)) {
                  $friend = $qry[username];
                  $friend2 = strtoupper($friend);
                  echo '<td align=left width=150px><a href=galleries/members/'.$friend2.'><font face=tahoma size=2>'.$friend.'</font></a></td>';
                     if($i == 4)
                         {
                             echo '</tr><tr>';
                             $i = 0; // reset counter
                         }
                      $i++;
               }//end while
            echo '</tr></table>';
         }//end num rows
      }//end result3
include("footer.php");

 

i have the same coding style in a bunch of other pages and it displays fine, i dont know what is causing it to do this

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/150932-solved-problem-with-tables-please-help/
Share on other sites

I suspect you've still got a table open somewhere.

 

If you're using Firefox you can download a very handy add-on called "Web Developer" that adds a row of icons along the top of the browser.

 

https://addons.mozilla.org/en-US/firefox/addon/60

 

Just use Outline>Outline Tables>Cells

 

That will highlight all your cells so you can see what's going on.

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.