Ver Mensaje Individual
  #9 (permalink)  
Antiguo 15/11/2011, 15:05
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años, 8 meses
Puntos: 2135
Respuesta: mostrar imagen de la base de datos

No, más bien ya tienes la imagen en binario, es simplemente que la muestres, por ejemplo en tu código inicial le mandas el id:
Código PHP:
Ver original
  1. echo '<img src="verfoto.php?id='.$f['id'].'" width="100" heigth="100">';

En verfoto.php:
Código PHP:
Ver original
  1. $id = (int) $_GET['id'];
  2. include 'db.inc.php';
  3. $re=mysql_query("select * from galeria where id=$id");
  4.  
  5. header("Content-type: image/jpg");
  6. echo $f['foto'];

Así te debería de mostrar la imagen.

Saludos.