Ayuda!
Código:
Saludos! <?php <?php if (!$cate) { include ("conexion.php"); $sql = "SELECT * FROM chistes"; $resp = mysql_query ($sql); $deportes = mysql_query ("SELECT * FROM articulos WHERE categoria LIKE 'deportes'",$conexion); $animales = mysql_query ("SELECT * FROM articulos WHERE categoria LIKE 'animales'",$conexion); $machistas = mysql_query ("SELECT * FROM articulos WHERE categoria LIKE 'machistas'",$conexion); $feministas = mysql_query ("SELECT * FROM articulos WHERE categoria LIKE 'feministas'",$conexion); $politica = mysql_query ("SELECT * FROM articulos WHERE categoria LIKE 'politica'",$conexion); $religiosos = mysql_query ("SELECT * FROM articulos WHERE categoria LIKE 'religioso'",$conexion); while ($row = mysql_fetch_array($resp)) { } ?> <font face="Trebuchet MS" size="2"> </font> <table width="500" border="0" align="center"> <tr> <td> <p align="center"><font face="Trebuchet MS" size="2"><img src="images/folder.gif" width="16" height="16"> <a href="chistes.php?cate=deportes">Deportes</a><br> </font></p> </td> <td> <div align="center"><font face="Trebuchet MS" size="2"><img src="images/folder.gif" width="16" height="16"> <a href="chistes.php?cate=animales">Animales</a><br> </font></div> </td> <td> <div align="center"><font face="Trebuchet MS" size="2"><img src="images/folder.gif" width="16" height="16"> <a href="chistes.php?cate=machistas">Machistas</a><br> </font></div> </td> </tr> <tr> <td> <div align="center"><font face="Trebuchet MS" size="2"><img src="images/folder.gif" width="16" height="16"> <a href="chistes.php?cate=feministas">Feministas</a><br> </font></div> </td> <td> <div align="center"><font face="Trebuchet MS" size="2"><img src="images/folder.gif" width="16" height="16"> <a href="chistes.php?cate=politica">Politica</a><br> </font></div> </td> <td> <div align="center"><font face="Trebuchet MS" size="2"><img src="images/folder.gif" width="16" height="16"> <a href="chistes.php?cate=religiosos">Religiosos</a><br> </font></div> </td> </tr> </table> <p><font face="Trebuchet MS" size="2"> <?php } elseif ($cate == deportes) { include ("conexion.php"); $sql = "SELECT * FROM chistes WHERE categoria='$cat'"; $resp = mysql_query ($sql); while ($row = mysql_fetch_array ($resp)) { echo "Nombre: <a href=verc.php?id=".$row ["id"].">".$row ["nombre"]."</a><br>"; echo "Leído ".$row ["lec"]." veces.<br><br>"; } $cuantas = mysql_num_rows ($resp); echo "<font face='Trebuchet MS' size='2'><br><br>Hay <b>$cuantas</b> chistes en la base de datos</font>"; } elseif ($cate == animales) { include ("conexion.php"); $sql = "SELECT * FROM chistes WHERE categoria='$cat'"; $resp = mysql_query ($sql); while ($row = mysql_fetch_array ($resp)) { echo "Nombre: <a href=verc.php?id=".$row ["id"].">".$row ["nombre"]."</a><br>"; echo "Leído ".$row ["lec"]." veces.<br><br>"; } $cuantas = mysql_num_rows ($resp); echo "<font face='Trebuchet MS' size='2'><br><br>Hay <b>$cuantas</b> chistes en la base de datos</font>"; } elseif ($cate == machistas) { include ("conexion.php"); $sql = "SELECT * FROM chistes WHERE categoria='$cat'"; $resp = mysql_query ($sql); while ($row = mysql_fetch_array ($resp)) { echo "Nombre: <a href=verc.php?id=".$row ["id"].">".$row ["nombre"]."</a><br>"; echo "Leído ".$row ["lec"]." veces.<br><br>"; } $cuantas = mysql_num_rows ($resp); echo "<font face='Trebuchet MS' size='2'><br><br>Hay <b>$cuantas</b> chistes en la base de datos</font>";; } elseif ($cate == feministas) { include ("conexion.php"); $sql = "SELECT * FROM chistes WHERE categoria='$cat'"; $resp = mysql_query ($sql); while ($row = mysql_fetch_array ($resp)) { echo "Nombre: <a href=verc.php?id=".$row ["id"].">".$row ["nombre"]."</a><br>"; echo "Leído ".$row ["lec"]." veces.<br><br>"; } $cuantas = mysql_num_rows ($resp); echo "<font face='Trebuchet MS' size='2'><br><br>Hay <b>$cuantas</b> chistes en la base de datos</font>"; } elseif ($cate == politica) { include ("conexion.php"); $sql = "SELECT * FROM chistes WHERE categoria='$cat'"; $resp = mysql_query ($sql); while ($row = mysql_fetch_array ($resp)) { echo "Nombre: <a href=verc.php?id=".$row ["id"].">".$row ["nombre"]."</a><br>"; echo "Leído ".$row ["lec"]." veces.<br><br>"; } $cuantas = mysql_num_rows ($resp); echo "<font face='Trebuchet MS' size='2'><br><br>Hay <b>$cuantas</b> chistes en la base de datos</font>"; } elseif ($cate == religiosos) { include ("conexion.php"); $sql = "SELECT * FROM chistes WHERE categoria='$cat'"; $resp = mysql_query ($sql); while ($row = mysql_fetch_array ($resp)) { echo "Nombre: <a href=verc.php?id=".$row ["id"].">".$row ["nombre"]."</a><br>"; echo "Leído ".$row ["lec"]." veces.<br><br>"; } $cuantas = mysql_num_rows ($resp); echo "<font face='Trebuchet MS' size='2'><br><br>Hay <b>$cuantas</b> chistes en la base de datos</font>"; } ?> ?>