Ver Mensaje Individual
  #17 (permalink)  
Antiguo 21/02/2012, 15:15
edie8
 
Fecha de Ingreso: noviembre-2011
Mensajes: 516
Antigüedad: 13 años, 3 meses
Puntos: 10
Respuesta: Duda con valores while

Lo he hecho tal como digiste pero sige sin funcionar mira este es el codigo:
Código PHP:
<?php
include('../config.php');
$resultados=mysql_query("select * from imagenes where id_logueado='$id_usuario'",$conexion) or 
  die(
"Problemas en el select:".mysql_error());
$i 0;
$arr=array();
$fot=mysql_fetch_assoc($resultados);
$foto_nombre=$fot['nombre'];

$arr= array($i=> $foto_nombre);
echo 
'<img scr="'.$foto_nombre.'">';




$registros=mysql_query("select count(*) as cantidad  from imagenes where id_logueado='$id_usuario'",$conexion) or
  die(
"Problemas en el select:".mysql_error());
  
$reg=mysql_fetch_array($registros);
  
$cantidad=$reg['cantidad'];
  if(
$_POST["img"] == $cantidad)
  { 
    
?><img src="<?php echo $arr[$i]; ?>" rel="$i" /><?php 
    
}
else
    {
     
?><img src="<?php echo $arr[$_POST["img"]+1];?>" rel="<?php echo $arr[$_POST["img"]+1];?>"/><?php 
    
}
echo    
$_POST['img'];
    
$i++;
?>
Ahora no me muestra ninguna imagen de las que antes me mostraba, que es lo que tengo mal??? gracias por la ayuda.

Última edición por edie8; 22/02/2012 a las 04:13