Ver Mensaje Individual
  #9 (permalink)  
Antiguo 06/02/2012, 13:10
orw28
 
Fecha de Ingreso: agosto-2009
Ubicación: Venezuela
Mensajes: 82
Antigüedad: 14 años, 9 meses
Puntos: 0
Respuesta: Subir imagen desde MySql con php a una web!

Mira mi codigo para mostrar datos:

<?php

//Conecto con la BD..
require("conexion.php");

if (isset($_POST['consultar'])){

//Definir variables..
$nomb=$_POST['libro'];

if ($nomb !=""){
// Validar si el registro ya existe en la base de datos.
$validar= "SELECT * FROM libros WHERE titulo='$nomb'";
$result=mysql_query($validar);


if (mysql_num_rows($result) == 0) {
echo "<script> alert ('Libro no existe')</script>";
}
else {


$consulta=mysql_fetch_array($result);

echo("<tr align=center><td><strong>Los datos del libro son:</strong></td></tr>");
echo "<table width='70%' border='3' bordercolor = orange height='50%'>\n";
echo "<tr>\n","<td><STRONG>Titulo:</STRONG></td><td>$consulta[1]</td></tr>\n";
echo "<tr>\n","<td><STRONG>Resumen:</STRONG></td><td>$consulta[2]</td></tr>\n";
echo "<tr>\n","<td><STRONG>Descripcion:</STRONG></td><td>$consulta[2]</td></tr>\n";
echo "<tr>\n","<td><STRONG>Precio:</STRONG></td><td>$consulta[4]</td></tr>\n";
echo "<tr>\n","<td><STRONG>Editorial:</STRONG></td><td>$consulta[5]</td></tr>\n";
echo "<tr>\n","<td><STRONG>Autor:</STRONG></td><td>$consulta[7]</td></tr>\n";
echo "<tr>\n","<td><STRONG>Imagen:</STRONG></td><td><imgsrc=http//http://localhost/Administrador/Libros_img/.$consulta[6]></td></tr>\n";
echo "</table>";
}
}
else { echo "<script> alert ('Debe insertar el nombre del libro')</script>"; }
}
?>

Pero sigue sin mostrarme la Imagen, sino que me muestra un cuadrito como si la img no estubiera o estubiera dañada.. Ayuda please, realmente soy nueva con esto (obvio jeje) =(