Maybe i didn't construct this right, but here's what i got...
$dir = "/home/dblsports/www/images/user_uploaded/".$pictures['directory'];
$d = dir($dir);
$img = array();
while(FALSE !== ($file=readdir($d))){
if($file != '.' && $file != '..'){
array_push($img, $file);
}
}
$img1 = $img[0];
echo "img1: " . img1 . "<br>";
echo "<td><center><a href=\"http://www.dblsports.com/images/display_thumbnails.php?PIC=".$pictures['id']."&directory=".$pictures['directory']."\"><font size=\"2\" face=\"Tahoma\"><b> ".$pictures['title']."</b></font><br>
<img src=\"images/user_uploaded/".$pictures['directory']."/".$img1."\" heigth=\"100\" width=\"100\" border=\"0\"></a></center></td>\n";
it's still not correct..
$img1 is not outputing anything. And i am getting a "Warning: readdir(): supplied argument is not a valid Directory resource in /home/www/dblsports/page.php on line 122"
line 122 is: while(FALSE !== ($file=readdir($d))){
I am lost now.. with first peice of code i tried to contruct it from what i read in the php manual.
I used the manual to create the page that displays all of the images... that script works fine.... but i can't seem to figure out how to read and then select one single image from the directory.
Thanks for standing by,
phence