Colabora en los FAQ. Ayudarás a la comunidad y esta te lo agradecerá.
<?$categoria = "SELECT * FROM foro_categoria ORDER BY id ASC";$cat1 = mysql_query($categoria);while ($categoria = mysql_fetch_assoc($cat1)) {echo '<div class="box_orange" style="margin-bottom:5px; border-radius:3px">'.$categoria[cat_nombre].'<span style="float:right; width:230px">Último mensaje</span><span style="float:right; width:88px;">Mensajes</span><span style="float:right; width:88px;">Temas</span></div>';$cat = "SELECT * FROM foro_cat ORDER BY id ASC";$cat2 = mysql_query($cat);while ($cat = mysql_fetch_assoc($cat2)) {echo '<div class="box_content" style="border-radius:3px"><div class="gradient"> <div style="float:left; margin-top:3px; margin-right:10px;"><img src="'.$cat[icono].'" width="38px" height="37px"></div> <span style="float:left; margin-top:3px;"><a href="#"><b>'.$cat[nombre].'</b></a><br>'.$cat[descripcion].'</span> <div style="float:right; width:25px; margin-top:10px; text-align:center;"></div> <div style="float:right; width:200px; height:47px;"><div style="float:left; background:url(http://www.habbohotel.es/habbo-imaging/avatarimage?user='.$rowss[m_habbo].'&direction=2&head_direction=2&size=s); background-position:-6px -11px; height:35px; width:20px; margin-right:10px; margin-bottom:-10px;"></div><a href="home.php?nick='.$rowss[m_nick].'">'.$rowss[m_nick].'</a> <br><div style="width:170px; overflow:hidden; display:block; white-space:nowrap; text-overflow:ellipsis;"><a href="foro/tema/4603" style="color:inherit; font-weight:inherit;">'.$rowss[m_respuesta].'</a></div></div><div style="float:right; width:137px; margin-top:10px; text-align:center;">'.$cat[mensajes].'</div><div style="float:right; width:56px; margin-top:10px; text-align:center;">'.$cat[temas].' '; echo '</div></div></div>'; }} ?>
Deberías separar la parte de maquetación y diseño de la parte de programación.
Me alegro, yo en mis inicios he desarrollado un foro también desde 0, lo tengo en mi repositorio.. Por si le quieres echar un vistazo dime lo.
Es un proyecto de mis inicios de programación, aún que la fecha de subida es reciente. Verás código inútil, demás cosas..https://github.com/redigaffi/SimpleForum