I didnt had this problem with my previous scripts but for this case the result was this :
Notice the awkward gap for each table rows ? I tried maximising the width of table to standardise but couldnt improve much with <width:500px>
My source code for the 2 tables are :
//check whether period falls under new projects
$sql2a= "SELECT projectname, from_unixtime(startdate + (15*3600), '%y %m %d') AS StartDate, projectvalue, from_unixtime(enddate + (15*3600), '%y %m %d') AS EndDate, from_unixtime(projectedenddate + (15*3600), '%y %m %d')AS ProjectedEndDate, from_unixtime(completiondate + (15*3600), '%y %m %d') AS CompletionDate, from_unixtime(closeddate + (15*3600), '%y %m %d') AS ClosedDate, from_unixtime(createddate + (15*3600), '%y %m %d') AS CreatedDate, id FROM projects WHERE startdate BETWEEN '{$startdate}' and '{$enddate}'";
$sql2a = mysql_query($sql2a);
echo "<header><font size'3' color='Green'> New Projects </font></header>";
while($sqlrow = mysql_fetch_array($sql2a))
{
echo "<table border='1'>
<tr>
<th>Project Name</th>
<th>Start Date</th>
<th>Project Value</th>
<th>End Date</th>
<th>Projected End Date</th>
<th>Completion Date</th>
<th>Closed Date</th>
<th>Project ID</th>
<th>ID</th>
</tr>";
echo "<tr>".
"<td>".$sqlrow[0] . "</td>".
"<td>".$sqlrow[1] . "</td>".
"<td>".$sqlrow[2] . "</td>".
"<td>".$sqlrow[3] . "</td>".
"<td>".$sqlrow[4] . "</td>".
"<td>".$sqlrow[5] . "</td>".
"<td>".$sqlrow[6] . "</td>".
"<td>".$sqlrow[7] . "</td>".
"<td> <form action='ListProjectDetails.php' method='post'> ".
" <INPUT type='submit' value='{$sqlrow[8]}' name='submitid'> </form> </td>";
echo "</tr>";
}
echo "<br></br>";
//check whether period falls under completed projects
echo "<header><font size'3' color='Blue'> Completed Projects </font></header>";
$sql2b = "SELECT projectname, from_unixtime(startdate + (15*3600), '%y %m %d') AS StartDate, projectvalue, from_unixtime(enddate + (15*3600), '%y %m %d') AS EndDate, from_unixtime(projectedenddate + (15*3600), '%y %m %d')AS ProjectedEndDate, from_unixtime(completiondate + (15*3600), '%y %m %d') AS CompletionDate, from_unixtime(closeddate + (15*3600), '%y %m %d') AS ClosedDate, from_unixtime(createddate + (15*3600), '%y %m %d') AS CreatedDate, id FROM projects WHERE closeddate BETWEEN '{$startdate}' and '{$enddate}'";
$sql2b = mysql_query($sql2b);
while($sqlrow2 = mysql_fetch_array($sql2b))
{
echo "<table border='1'>
<tr>
<th>Project Name</th>
<th>Start Date</th>
<th>Project Value</th>
<th>End Date</th>
<th>Projected End Date</th>
<th>Completion Date</th>
<th>Closed Date</th>
<th>Created Date</th>
<th>Project ID</th>
</tr>";
echo "<tr>".
"<td>".$sqlrow2[0] . "</td>".
"<td>".$sqlrow2[1] . "</td>".
"<td>".$sqlrow2[2] . "</td>".
"<td>".$sqlrow2[3] . "</td>".
"<td>".$sqlrow2[4] . "</td>".
"<td>".$sqlrow2[5] . "</td>".
"<td>".$sqlrow2[6] . "</td>".
"<td>".$sqlrow2[7] . "</td>".
"<td> <form action='ListProjectDetails.php' method='post'> ".
" <INPUT type='submit' value='{$sqlrow2['8']}' name='submitid'> </form> </td>";
echo "</tr>";
}