Ver Mensaje Individual
  #6 (permalink)  
Antiguo 18/12/2008, 12:25
Proguri
 
Fecha de Ingreso: abril-2008
Ubicación: Montevideo - Uruguay
Mensajes: 156
Antigüedad: 16 años
Puntos: 5
Respuesta: Problam al pasar id para mostrar imagen

Hi

Deberias recorrer tambien el array, no ?

Código php:
Ver original
  1. <?php
  2. if ($_GET['id'])
  3. {
  4.     $hostname = "localhost";
  5.     $database = "oscar";
  6.     $username = "root";
  7.     $password = "pass";
  8.     $conexion = mysql_connect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
  9.       mysql_select_db($database, $conexion);
  10.     $sql = "SELECT * FROM imagenes";
  11.     $mostrar_sql = @mysql_query($sql, $conexion) or die(mysql_error());
  12.     while ($row_sql = mysql_fetch_assoc($mostrar_sql)) {
  13. ?>
  14. <img src="<?php echo $row_sql['id']?>"></img>
  15. <?php
  16.     }
  17. }
  18. else {
  19.  
  20.     echo ("Error al mostra la imagen o puede que no exista);
  21. }
  22. ?>

Prueba a ver que tal :)

-ByE-
__________________
--
Mi Portfolio Online! Visitalo!
--