it might be a problem with your SQL statement, which doesn't manifest until you actually ask it to do something on line 13.
I would change it to this:
$query = "SELECT * FROM poster WHERE category=".$show." ORDER BY code LIMIT 0,30";
hope it helps.
On a purely cosmetic level, you may want to ident nested code. It can make it easier to tell what is dependent on what:
for($i = 0; $i < $num_rows; $i++) {
$row = mysql_fetch_array($result); // Line 13 //
if($i % $columns == 0) {
echo "<TR>\n";
}
echo "<TD>"
.$row['code']
."</TD>\n";
if(($i % $columns) == ($columns - 1) || ($i + 1) == $num_rows) {
echo "</TR>\n";
}
}
echo "</TABLE>\n";
cheers,
Jason