Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/12/2008, 22:41
knito
 
Fecha de Ingreso: julio-2008
Mensajes: 24
Antigüedad: 15 años, 10 meses
Puntos: 0
Ayuda con mostrar una imagen q esta almacenada en una base de datos

Hola

Mi porblema es que tengo almacenada mi imagen en una base de datos en mysql pero cuando la quiero mostrar no lo hace .... alguien puede ayudarme a indicarme q estoy haciendo mal porfavor..
Este es mi codigo
<html>
<head>
<link rel="stylesheet" type="text/css" href="estilo.css" />
<title>Index</title>
</head>
<body>
<?php
require "./functions/functions.php";
$con=conecta();
$sql="SELECT * FROM producto";
$res=mysql_query($sql,$con);

$codigo = mysql_result($res, 0, "codigo");
$nombre = mysql_result($res, 0, "nombre");
$imagen= mysql_result($res, 0, "imagen");

echo "<table align='center' border='1' bordercolor='#222222' width='600' height='100'>";
echo "<tr width='50' height='50' >";
echo "<td>";
echo "Nombre";
echo"</td>";
echo "<td>";
echo "<b>$codigo</b> <br>";
echo"</td>";
echo "</tr>";

echo "<tr width='50' height='50' >";
echo "<td>";
echo "Informacion";
echo"</td>";
echo "<td>";
echo "<b>$nombre</b> <br>";
echo"</td>";
echo "</tr>";

echo "<tr width='50' height='50' >";
echo "<td>";
echo "Imagen";
echo"</td>";
echo "<td>";
echo "<b><img src='./Productos/$imagen'> <br>";
echo"</td>";
echo "</tr>";

echo "</table>";
echo "<a href=\"listarp.php\"> Regresar</a>";

?>
</body>
</html>


donde Productos representa mi carpeta donde estan almacenadas mis imagenes. gracias