Mam skrypt do upluadowania oraz tworzenia miniaturek. I nie mam pojęcia jak zrobić aby dodając wiele zdięc ich nazwy wyświetlały się pod formularzem jak na onet.pl lub allegro.pl
oto kod:
<?php function resize($file=null,$dest=null,$max_width=140,$max_height=140,$quality=140){ if($file==null || $dest==null){ return; } switch($ext){ case 1: $src=imageCreateFromGif($file); break; case 2: $src=imageCreateFromJpeg($file); break; case 3: $src=imageCreateFromPng($file); break; } $x_ratio = $max_width / $width; $y_ratio = $max_height / $height; if( ($width <= $max_width) && ($height <= $max_height) ){ $tn_width = $width; $tn_height = $height; } elseif (($x_ratio * $height) < $max_height){ $tn_width = $max_width; } else{ $tn_height = $max_height; } $dst = ImageCreateTrueColor($tn_width, $tn_height); ImageCopyResampled($dst, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height); ImageJpeg($dst,$dest,$quality); ImageDestroy($src); ImageDestroy($dst); } $b= resize('images/'.$file_name.'','mini/'.$file_name.''); ..." "..... <form action="add.php" name="kopiarka" method="post" enctype="multipart/form-data"> <input type="hidden" name="MAX_FILE_SIZE" value="5120000"> Wybierz plik do przerzucenia:<br> <input type="file" name="file" size="20"> <input type="hidden" name="dir" value="images"> <input type="hidden" name="on" value="".$z.""> <input type="hidden" name="ok" value="ok"> <input type="submit" value="Kopiuj"> </form> <br>"; ?>
I nie wiem jak rozwiązac ten problem bardzo was prosze o pomoc .