Re: Colocar imagen en html

From: Date: Fri, 06 Jul 2007 16:52:50 +0000
Subject: Re: Colocar imagen en html
References: 1 2 3 4  Groups: php.general.es 
Request: Send a blank email to general-es+get-61051@lists.php.net to get a copy of this message
Gracias nuevamente, he hecho esto : imagenes.php <?php include("variables.php"); $id = !empty($_GET['id']) && is_numeric($_GET['id']) ? $_GET['id'] : die("id is empty"); $con = mysql_connect($host,$user,$pass) or die (mysql_error()); $abre = mysql_select_db($base,$con) or die (mysql_error()); $sql= "SELECT imagen, cabecera FROM $tabla1 WHERE id=$id"; echo $sql; $res = mysql_query($sql,$con); $row = mysql_fetch_row($res); $blob = $row[0]; $tipo = $row[1]; header("Content-type: {$tipo}"); echo $blob; ?> Y aca le paso el id <td width='160' height='123'> <img src='imagenes.php?id=".$fila['id']."' alt=''/></td> Pero no veo la imagen y si llamo a imagenes.php?id=1 me dice : Warning: Cannot modify header information - headers already sent by (output started at c:\archivos de programa\easyphp1-8\www\proyecto\imagenes.php:7) in c:\archivos de programa\easyphp1-8\www\proyecto\imagenes.php on line 12 Alguna idea?

« previous php.general.es (#61051) next »