Código PHP:
<?php
conectar();
$query="SELECT id, imagen, descripcion FROM imagen";
$result=mysql_query($query);
$row = mysql_fetch_array ($result);
header("Content-Type: image/jpeg");
echo $row['imagen'];
?>
<table border="1" bordercolor=cc9900>
<tr>
<td ><em><strong>ID</strong></em></td>
<td ><em><strong>Imagen</strong></em></td>
<td ><em><strong>descripcion</strong></em></td>
</tr>
<?php while($row= mysql_fetch_array($result))
{
$imagen = "<img src='".$row['imagen']."'>";
?>
<tr>
<td ><?php echo $row['id']; ?></td>
<td ><?php echo $imagen; ?> <?php echo $row['imagen']; ?></td>
<td ><?php echo $row['descripcion']; ?>
</td>
<td ><a href="<?php echo "profesion.php?id=$row[id]"; ?>">Eliminar</a></td>
</tr>
<?php }
?>
</table>
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\conectar.php:13) in C:\AppServ\www\profesion.php on line 75
En la linea 75 dice:
Código PHP:
header("Content-Type: image/jpeg");
Código PHP:
<?php
function conectar()
{
$link=mysql_connect("localhost","root","contraseña");
mysql_select_db("constructora", $link);
}
?>