Visualizzazione dei risultati da 1 a 3 su 3

Discussione: galleria immagini

  1. #1

    galleria immagini

    Ciao a tutti
    Ho un problemino con la seguente galleria, mi dareste una mano?
    Praticamente creo la tabella con le miniature e se clicco su una di queste dovrebbe apparire la corrispondente immagine sopra la tabella!Ma non va!
    Sapeti dirmi cosa sbaglio? grazie mille
    codice:
    <?
    $imagedir = "documenti/immagini"; //The image folder
    $thumbdir = "documenti/miniature"; //The thumbnail folder
    $colonne = 4; //How many images displayed per line
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    @import url(File/stile.css);
    </style>
    <head>
    <body>
    <table>
    
      <tr>
          <td>
    <? if ($show != "") //show the current image if any
    		{
    			print "<img src=documenti/immagini/$show>
    ";
    		} 
    ?>
        </td>
      </tr>
    </table>
    <table>
      <tr>
    
    <?php 
    
    $i=0;
    $handle=opendir($imagedir); 
    while (false!==($file = readdir($handle))) { 
        if ($file != "." && $file != "..") { 
    	  print "<td align='center' valign='middle'>
    </td>";
    	  ++$i;
    	  if($i == $colonne) { print "</tr><tr>"; 
    	  $i = 0;
    	  }
        } 
    }
    closedir($handle); 
    
    ?>
    
      </tr>
    </table>
    </body>
    </html>
    -->MeX23htm<--

  2. #2
    leggendo il codice vedo che la variabile $show e' l'unica che viene riempita con il metodo get;

    Quindi prova ad aggiungere $show=$_GET["show"]; prima dell' if ($show != "") ecc.ecc.

    ciao
    ______________________________________

    Progresso Web.

  3. #3
    grazie della dritta!
    -->MeX23htm<--

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.