I have this code:
<?
include('top.php');
include('left.php');
include('dbinfo.inc.php');
echo" <td width='81%'><table><tr>";
$kind = $HTTP_GET_VARS['kind'];
$query = mysql_query("SELECT * FROM auto WHERE kind='$kind'") or die(mysql_error());
$num=mysql_num_rows($query) or die(mysql_error());
$i=0;
while($i<$num)
{
$cols = 1;
while($cols<=3) {
$row = mysql_fetch_array($query) or die(mysql_error());
$link = $row['stockid'];
$year = $row['year'];
$make = $row['make'];
$model = $row['model'];
$image = $row['image'];
echo "<td><a href='show.php?stockid=$link'><img src='$kind/$image' width='250'
height='100'><br> $year $make $model </a></td>";
$cols++;
$i++;
} if($num %3 == 0){ echo "</tr>"; } else{ echo "</tr><tr>"; }
}
echo"</tr>
</table>
</td></tr></table>
<table width='100%' border='0' background='images/bottombg.jpg'><tr>
<td width='127%' height='15' style='text-align: center'><p align='center'><font size='1' face='Tahoma' color='#000000'><br>
<strong>©2004 Boulevard Auto Sales, INC & Spechal Effextc Design <br>
This site is currently managed by <a href='mailto:webmaster@blvdcars.com' target='_blank'>Spechal
Effextc</a><br>Website best viewed with IE 6+ and 1024 x 768 resolution.</strong></font></p></td></tr>
</table>
</center></div></td>
</tr> "; ?>
<EMBED SRC="audio/thumbsaudio.mp3" AUTOSTART="true" HIDDEN="true">
</table></table>
</body>
</html>
The way it is now, it the $num is a dirivative of 3 then everything is fine and it displays all 3 images to the row and give me my footer. But if it isnt...it doesnt display 3 full columns...then it will not display the last footer part of my page. It just stops after it displays the last 1 or 2 images of the row then gives a blank page. Any helps would be great, I have been battling this for days.