Picture a upload link used to up load JPEG, PNG, and GIF into a folder called /originals. Then a code standardizes the dimensions of the photos to a thumbnail and saves the new thumbnail in the /thumbnails folder.
How can I now display the thumbnail photo in an array in a 6 columned table in the webpage as soon as its uploaded?
My php block:
<?php
$files = scandir("./."/thumbnails);
$numFiles = count($files);
if($numFiles < 3)
{
echo "<p>Gallery is empty </p>";
}
else
{
echo "<p> click thumbnail </p>";
echo "<table><tr>";
for($i = 0; $i < $numfiles -2; $i++)
{
if($i % $Num_COLUMNS == 0 && $i != 0)
{
echo "</tr><tr>";
}
echo "<td>";
echo "<a href='ViewPicture.php?src=".urlencode($files[i +2])."' target='_blank'><img src='".GALLERY_THUMBNAILS.urlencode($files[$i + 2])."' alt='".$files[$i + 2])."' title='".$files[$i + 2]."'/></a>'";
echo "</td>";
}
echo "</tr> </table>";
}
?>