I doing a small website (school assigment) and I need to upload images and then display them using php
The coding needed to upload an image to the server is done, but i now have a problem to display the uploaded images to the website. The available code is not good( it worked perfectly on a friend website
) can some one check the code for me and tell me what wrong?
Thank you very much
<?php
$count = 1;
$dir ="uploads";
$odir = opendir($dir);
echo "<tr>";
while ($file = readdir($odir))
{
if (!is_dir($file))
{
echo "<td><a href='".$file."'>" ."<img src='".$odir .$file."' width = 200px height = 200px /></td>";
if($count > 2)
{
echo "</tr><tr>";
$count= 0;
}
$count++;
}
}
?>