$sql_contar="SELECT COUNT(*) FROM foro Where categoria=1"; $rs=mysql_query($sql_contar) or die(mysql_error());