Ver Mensaje Individual
  #7 (permalink)  
Antiguo 08/06/2010, 17:54
Myless
 
Fecha de Ingreso: enero-2010
Mensajes: 88
Antigüedad: 14 años, 4 meses
Puntos: 2
Respuesta: no mostrar contenido de la tabla que este en blanco...

Cita:
Iniciado por Most Ver Mensaje
bueno, ya lo he probado, me da este error:

Parse error: syntax error, unexpected '!' in /homepages/18/d317375696/htdocs/enlace.php on line 35


Codigo actualmente:

Código PHP:
Ver original
  1. <html>
  2. <head>
  3. <title>pelis.php</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. </head>
  6. <style TYPE="text/css">
  7.  
  8.  
  9. </style>
  10. <body style="background-image: url(imagenes/fondo.png); background-attachment:fixed;">
  11.  
  12. <?php
  13. $connect=mysql_connect("","","");
  14. $id=$_GET["ver"];  
  15. mysql_select_db("",$connect);
  16. $sql = "SELECT * FROM enlaces WHERE id = $id";
  17. $result = mysql_query($sql, $connect) or die (mysql_error());
  18.  
  19. while($row=mysql_fetch_array($result)){
  20.  
  21. //se muestran todos los campos deseados, menos los vacios
  22.  
  23. if($row['caratula'] != ""){
  24. echo $caratula=$row['caratula']."<br />";
  25. }
  26. if($row['nombre'] != ""){
  27. echo $nombre=$row['nombre']."<br />";
  28. }
  29. if($row['anio'] != ""){
  30. echo $anio=$row['anio']."<br />";
  31. }
  32. if($row['detalles'] != ""){
  33. echo $detalles=$row['detalles']."<br />";
  34. }
  35. if($row['id'] ! ""){
  36. echo $row['id']."<br />";
  37. }
  38. if($row['enlaces'] ! ""){
  39. echo $enlaces=$row['enlaces']."<br />";
  40. }
  41. if($row['detalles'] ! ""){
  42. echo $detalles=$row['detalles']."<br />";
  43. }
  44.  
  45.  
  46. }
  47.  
  48. ?>
  49. <table>
  50.     <tr>
  51.         <td rowspan="4"><img style="width: 120px; height: 180px;" src="<? echo $caratula; ?>" /></td>
  52.         <td>
  53.             <table>
  54.                 <tr>
  55.                     <td><b>Nombre:</b> <? echo $nombre; ?></td>
  56.                 </tr>
  57.                 <tr>
  58.                     <td><b>Año:</b> <? echo $anio; ?></td>
  59.                 </tr>
  60.                 <tr>
  61.                     <td><b>Servidor:</b> <? echo $servidor; ?></td>
  62.                 </tr>
  63.                 <tr>
  64.                     <td><b>Detalles/sinopsis:</b><br><textarea style="width:480px; height:100px; padding:5px"><? echo $detalles; ?></textarea></td>
  65.                 </tr>
  66.             </table>
  67.         </td>
  68.     </tr>
  69. </table>
  70. <b>Links de descarga:</b><br>
  71. <textarea name="textarea" style="width:480px; height:150px; padding:5px"><? echo $enlaces ?></textarea>
  72. <?
  73. ?>
  74. </body>
  75. </html>
Cambia:
if($row['id'] ! ""){
echo $row['id']."<br />";
}
if($row['enlaces'] ! ""){
echo $enlaces=$row['enlaces']."<br />";
}
if($row['detalles'] ! ""){
echo $detalles=$row['detalles']."<br />";
Por

if($row['id'] != ""){
echo $row['id']."<br />";
}
if($row['enlaces'] != ""){
echo $enlaces=$row['enlaces']."<br />";
}
if($row['detalles'] != ""){
echo $detalles=$row['detalles']."<br />";