Evening all,The code i am using is as follows : \[code\]<?php/** * The template for displaying all pages. * Template Name: addserverindexoci * This is the template that displays all pages by default. * Please note that this is the WordPress construct of pages * and that other 'pages' on your WordPress site will use a * different template. * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */get_header(); ?><div id="primary" class="site-content"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?><table border="2" bordercolor="#000000" style="background-color:#FFFFFF" width="160%" cellpadding="1" cellspacing="0"> <td><font face="Arial, Helvetica, sans-serif">Server Name</font</td> <td><font face="Arial, Helvetica, sans-serif">Server Address</font</td> <td><font face="Arial, Helvetica, sans-serif">Server Port</font</td> <td><font face="Arial, Helvetica, sans-serif">Server Description</font</td> <td><font face="Arial, Helvetica, sans-serif"> Status</font</td><?phpmysql_connect("localhost", "", "") or die (mysql_error());#echo "Connected to MYSQL ";mysql_select_db("starforg_search") or die (mysql_error());#echo "Connected to Data Base";$query = "SELECT * FROM ";$result = mysql_query ($query) or die (mysql_error());$num=mysql_numrows($result);mysql_close();$i=0;while ($i < $num) { $value = http://stackoverflow.com/questions/15847093/mysql_result($result,$i,"servername"); $value2 = mysql_result($result,$i,"serveraddress"); $value3 = mysql_result($result,$i,"portnumber"); $value4 = mysql_result($result,$i,"description");ob_start();if (!$socket = @fsockopen($value2, $value3, $errno, $errstr, 1)){ echo " <font color='red'><CENTRE><strong> Server Is Offline!</strong></CENTRE></font>";}else { echo " <font color='green'><CENTRE><strong> Server Is Online!</strong></CENTRE></font>"; fclose($socket);}$status = ob_get_contents();ob_end_clean();?><tr> <td><font face="Arial, Helvetica, sans-serif"><? echo $value; ?></font</td> <td><font face="Arial, Helvetica, sans-serif"><? echo $value2; ?></font</td> <td><font face="Arial, Helvetica, sans-serif"><? echo $value3; ?></font</td> <td><font face="Arial, Helvetica, sans-serif"><? echo $value4; ?></font</td> <td><font face="Arial, Helvetica, sans-serif"><? echo $status; ?></font</td><?$i++;}?> </div><!-- #primary --><?php get_footer(); ?>\[/code\]What i want Now As you can see from the while loop i am trying to display all the data inside of selected fields.Whats happening I want to keep looping until all the data is displayed this works, however the data go's to the bottom of the page i am assuming because i am not using end tags for the html e.g < /tr>. the problem is if I enter end tags for the table it will only loop once and display the for set of data in the field the rest of the data will not be in table format.The question How can i get the loop to keep displaying all the data in the fields and also show the footer nice and clean,NOTE: sorry if this is a bit rough i am sick today