Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/01/2012, 23:32
Avatar de Nemutagk
Nemutagk
Colaborador
 
Fecha de Ingreso: marzo-2004
Ubicación: México
Mensajes: 2.633
Antigüedad: 20 años, 1 mes
Puntos: 406
Respuesta: Problemas al mostrar imagen con textos de Mysql.

En primera, como te dije en el post anterior tienes que separar los procesos...

Código PHP:
Ver original
  1. while ($columna = mysql_fetch_array($resultado)) {
  2. echo '<tr>';
  3. header( "Content-type: image/jpeg");
  4. echo "<td width=80px><img src=\"ver_foto.php?id=".$columna['id']."\" /></td><td>";
  5. echo "<p class='misubtitulo'>".htmlentities($columna['titulo'])."</p>";
  6. echo "<p class='mifechasubtitulo'>".$columna['fecha']."</p>";
  7. echo "<p class='noticontenido'>".htmlentities($columna['contenido'])."</p>";
  8. echo '</td>';
  9. echo '</tr>';
  10. }

ver_foto.php
Código PHP:
Ver original
  1. <?php
  2. $query = "SELECT * FROM Noticias WHERE id = ".$_GET['id'];
  3. $resultado = mysql_query($query,$cone) or die (mysql_error());
  4.  
  5. header( "Content-type: image/jpeg");
  6. echo mysql_result($resultado,0);
__________________
Listo?, tendría que tener 60 puntos menos de IQ para considerarme listo!!!
-- Sheldon Cooper
http://twitter.com/nemutagk
PD: No contestaré temas vía mensaje personal =)