Salve ragazzi, tramite codice php, visualizzo delle foto caricate nel mio db, ecco il codice:
solo che non me le visualizza in maniera allineata, ma cosi:codice:<h1>Visualizza le nostre Gallery </h1> <p align="justify"><?php $select_gallery = mysql_query("SELECT * FROM categorie_gallery"); $row_gallery = mysql_fetch_array($select_gallery); if($row_gallery['id_categoria']==NULL){ ?> <div align="center">Nessuna foto presente in archivio!</div> <?php } else { $select_gallery = mysql_query("SELECT * FROM categorie_gallery order by id_categoria "); while($row_gallery = mysql_fetch_array($select_gallery)){ ?> <div style="width: 250px; float:left;margin:10px;"> <table width="250" border="0"> <tr> <td><?php echo $row_gallery['nome']; ?></td> </tr> </table> <a href="index.php?page=21&id=<?php echo $row_gallery['id_categoria']; ?>"> <img src=" <?php $selct_foto = mysql_query("SELECT * FROM foto WHERE id_categoria = ".$row_gallery['id_categoria']." ORDER BY RAND()") or die(mysql_error()); $row_fotoo = mysql_fetch_array($selct_foto); echo str_replace('../','admin_gallery/',$row_fotoo['url_tn']); ?>" border="0" height="180"/> </a> </div> <?php } } ?></p>
Visualizzazione gallery

Rispondi quotando
