Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/03/2013, 10:19
yolanda16568
 
Fecha de Ingreso: agosto-2011
Mensajes: 165
Antigüedad: 13 años, 7 meses
Puntos: 1
Codigo (mostrar datos de mysql en dos columnas)

problemas con esta código necesito que este código

Código PHP:
<img src="imagen/<?php echo $row['nombre'];?>" width="128" height="115" class="centro" /><br />    
    <?php echo $row['lugar'];?><br />  <?php echo $row['precio'];?> Euros<br />
  
    <form id="form1" name="form1" method="post" action="Nueva carpeta/paginacionJamc/carrito_compra.php">
<input name="cantidad" type="hidden" id="cantidad" value="1" />
        <input name="precio" type="hidden" id="precio" value="<?php echo $row_carrito['precio']; ?>" />
        <input name="lugar" type="hidden" id="lugar" value="<?php echo $row_carrito['lugar']; ?>" />
        <input name="button" type="submit" class="rojo" id="button" value="Añadir al Carrito" />
    </form>

Me repita filas y columnas con este codigo
Código PHP:
<?php
 
 
// En este modo, notamos que abrimos un <tr> inicial...
// ...que extraño no?
echo '<table style="border: 1px inset" border="1"><tr>';

$columnas 3;
$filas 3;

$inicial 0;
$total $total mysql_num_rows($rsT); 

while (
$inicial $total)
{
  echo 
'<td>';
  
  
  echo 
"$inicial,$filas";

 
  echo 
'</td>';

  
// break!
  
if (++$inicial == $columnas)
  {
        if (!(--
$filas))
      {
         break;
      }
      
   
// cerramos y continuamos...
    
echo '</tr><tr>';
    
$inicial=0// debemos resetear!!!
  
}
  
}

// cerramos ambos...
echo '</tr></table>';
?>  




  <img src="imagen/<?php echo $row['nombre'];?>" width="128" height="115" class="centro" /><br />    
    <?php echo $row['lugar'];?><br />  <?php echo $row['precio'];?> Euros<br />
  
    <form id="form1" name="form1" method="post" action="Nueva carpeta/paginacionJamc/carrito_compra.php">
<input name="cantidad" type="hidden" id="cantidad" value="1" />
        <input name="precio" type="hidden" id="precio" value="<?php echo $row_carrito['precio']; ?>" />
        <input name="lugar" type="hidden" id="lugar" value="<?php echo $row_carrito['lugar']; ?>" />
        <input name="button" type="submit" class="rojo" id="button" value="Añadir al Carrito" />
    </form>

    <?php
}
?>