Cita:
El siguiente codigoWarning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/qsielw/public_html/notos/foro_testing/index_bb.php on line 25
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/qsielw/public_html/notos/foro_testing/index_bb.php on line 26
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/qsielw/public_html/notos/foro_testing/index_bb.php on line 26
Código PHP:
<?php
include("config.inc.php");
conectar();
// obtener totales
$res_total = mysql_query("select * from foro_totales where id = 1");
$total = mysql_fetch_row($res_total);
$total_post = $total[0];
$total_user = $total[1];
// obtener categorias
$res_cat = mysql_query("select * from foro_categoria");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<title> <?php echo $BBtitle;?> </title>
</HEAD>
<BODY>
<table width="100%">
<?php
while($cat = mysql_fetch_array($res_cat))
{
print "<tr><td bgcolor=\"#f7f7f7\">" .$cat["cat_name"]. "\n";
print "</tr></td>\n";
$res_foro = mysql_query("select * from foro_foros where f_cat =".$cat["id"],$con);
while($foro = mysql_fetch_array($res_foro))
{
print $foro["id"];
}
}
?>
</table>
</BODY>
</HTML>