Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/08/2008, 02:44
Avatar de Fogox
Fogox
 
Fecha de Ingreso: abril-2008
Mensajes: 59
Antigüedad: 16 años
Puntos: 0
Pregunta Problema al mostrar imagen con php y mysql

buenas que tal, yo estoy intentando mostrar una imagen de una base de datos y los datos de otra base de datos, por empezar tengo un problema me muestra la imagen en binario o caracteres , como le quieran llamar...
mi codigo es este...
Código PHP:
include ("conexion.php");
        
conectarce();
        
        
$cxx mysql_query("select imagen from subir_imagenes");
        
        
$imagen mysql_fetch_assoc($cxx);
        
        
        print(
$imagen['imagen']); 
eso por un lado, por otro tengo el mismo problema, me muestra los datos de una y otra base pero vuelve a salir la imagen en binario asumo que es el mismo problema el php es este...

Código PHP:
<?php
include ("conexion.php");
conectarce();


$datos =($_GET['id']) ? 'id=' mysql_escape_string ($_GET['id']) : "nombre ='".mysql_escape_string($_GET['nombre']) ."'";

    
$resultado  = @mysql_query("select imagen, tipo from subir_imagenes");
    
        
$resu = @mysql_query("select id from users");
        
        
    
$da mysql_query("select subir_imagenes.id , subir_imagenes.imagen, datos.id, datos.nombre FROM subir_imagenes, datos where subir_imagenes.id = datos.id");
        
                        
    print 
$imagen['imagen'];
    print 
$resu;
    print 
$da;  
        
?>
<table border="1">
<tr>
<th> id</th>
<th> nombre</th>
<th> ids</th>
<th> nombres</th>

<?php
        
        
        
while (list($id$imagen$ids ,$nombre) = mysql_fetch_row ($da)){
        
        print 
$da;
        
        
?>
        
        
                
       <tr>    
        <td> <?php print $id?> </td>
         <td> <?php print $imagen['imagen']; ?> </td>
          <td> <?php print $ids?> </td>
           <td> <?php print $nombres?> </td>
        </tr>
        <tr> </tr>
        
        <?php
        
}
        
        
        
?>
        </table>
bueno para resumir, me dan ayuda para ver las imagenes bien... ya con eso terndria resuelto el resto

muchas gracias

saludos

Fogox