try renaming your variables, it seems you have the post information in $row originally
Code:
while($row = mysql_fetch_array($q))
then you are replacing it with what looks to be the forum information
Code:
$row = mysql_fetch_array($q2);
rename the second variable and you should be good