Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/06/2011, 14:23
cabritillo77
 
Fecha de Ingreso: mayo-2011
Mensajes: 33
Antigüedad: 13 años
Puntos: 4
Problema al mostrar imagenes en galeria de imagenes

Mi problema es el siguiente:

Con este script quiero mostrar las 6 imagenes que contiene cada tituloevento pero sucede que cuando carga la pagina, me devuelve en la primera fila 5 imagenes del ultimo registro junto con la ultima imagen del primer registro y una segunda fila con 5 imagenes y la ultima imagen no es nada.

¿Quien me echa una mano con el codigo?

Código PHP:
<?
include_once"db-cnx.php";
if(isset(
$_GET['enviar'])){
    
// asignamos los valores
    // a las variables que usaremos
    
$tituloevento $_GET['tituloevento'];
    
    
}

$sqlevento mysql_query("SELECT tituloevento, fotos FROM eventos order by ideventos desc"$db_link) or die(mysql_error);
 
$numfotos mysql_num_rows($sqlevento);
$columns 6;
$row mysql_fetch_array($sqlevento);
?>        
        
<body bgcolor="#FFE821">
<center>
<font color="steelblue"><b>FOTOS DE ACTOS,CAMPEONATOS Y EQUIPOS</b></FONT>
</center>
<HR size="5" COLOR="NAVY">
<?

       
echo"<table>";
    echo 
"<caption align='top'><font color='steelblue'><b>$row[tituloevento]</b></font><br></caption>";
           
        for(
$i 0$i $numfotos$i++) {
      
$row mysql_fetch_array($sqlevento); 
          if(
$i $columns == 0) {

         echo 
"<tr>";
         }
        
        echo 
"<td valing='top' align='center' width='' height=''><a href='imagesr2011/$row[fotos]'>"
        echo 
"<img src='imagesr2011/$row[fotos]' width='150' height='150'"
        echo 
" border=0>"
        echo 
""
        echo 
"<br><br></td>";
        if((
$i $columns) == ($columns 1) || ($i+1) == $numfotos) {
            
        echo 
"</tr>";
        
       } 
           
       }
        echo 
"</table>"
    echo
"<HR size='5' COLOR='NAVY'>";
         






?>
</body>