![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
17/11/2011, 10:20
|
| | Fecha de Ingreso: octubre-2011
Mensajes: 129
Antigüedad: 13 años, 4 meses Puntos: 1 | |
Respuesta: mostrar imagen de la base de datos haber no entiendo porque no se me ve,seré muy torpe yo o nose..xd
index.php
session_start();
echo $_SESSION['usuario'];
if( isset($_SESSION['usuario']) )
{
echo "Has iniciado sesion correctamente";
}
//
include 'db.inc.php';
$re=mysql_query("select * from galeria");
while($f=mysql_fetch_array($re)){
echo $f['nombre'].'<br>';
echo '<img src="verfoto.php?foto='.$f['foto'].'" width="100" heigth="100">';
}
conexion a la bd puesto anteriormente y luego lo tngo verfoto.php
$id = (int) $_GET['foto'];
include 'db.inc.php';
$re=mysql_query("select * from galeria where foto=$id");
$f=mysql_fetch_array($re);
header("Content-type: image/jpg");
echo $f['foto'];
No se me muestra xd |