ok I need a way cause my source code does not like this. I made it but it doesn't use tables and I want this to use tables instead of how i have this set up. Can someone please help me with this? Here is the current code i have set up for use with this.
Code:
<?php
$path = "upload/";
$dir_handle = @opendir($path) or die("Unable to open folder");
echo "<title>Image Uploader</title>";
echo "<form action='uploader.php' method='post' enctype='multipart/form-data'>";
echo "<div align='center'><label for='file'>Select a file:</label> <input type='file' name='userfile' id='file'></div> <br/>";
echo "<div align='center'>File types allowed: .jpg .jpeg .bmp .png .gif</div>";
echo "<div align='center'>Max file size: 2.0 MB</div>";
echo "<div align='center'><input type='submit' name='submit' value='Upload' /></div>";
echo "</form>";
echo "<center><a href='png.php'>Click here </a>to view PNG files</center>";
echo "<center><u><h2>Uploaded Photos</h></u></center>";
echo "<center>Pictures open up in a new Tab</center>";
echo "<center>Click the picture to enlarge</center>";
$filecount = count(glob("" . $path . "*.*"));
echo "<center> </center>";
echo "<center>Total files in our database is: '$filecount'</center>";
echo "<center>PNG files are not listed here as they slowed loading counter is right</center>";
while (false !== ($file = readdir($dir_handle))) {
if(ereg("(.*)\.(jpg|bmp|jpeg|gif)", $file)){
echo "<a href='$path$file' target='_blank'><img src='$path$file' alt='$file' width='200' height='200'></img></a>";
}
}
closedir($dir_handle);
?>
Comment