Im trying to create a dynamic gallery thats is self referencing from the URL when the apporpriate image is select from the side bar.
This is the code in the navigation bar ....
<?php
$handle = opendir('Thumbs');
if($handle) {
while(false !== ($file = readdir($handle))){
if(preg_match("/\w+(.gif)/",$file)){
$sendimage = substr(strtok($file, "."), 1, strlen($file)-3);
print "<a href='gallery.php?image=$sendimage'><img src=Thumbs/$file border='0'></a> <br><br>";
}
}
}
closedir($handle);
?>
It produces the list of images that are in the thumbs folder!!
Then this part ....... it just produces the last image in the folder rather than self referencing the URL.
<?php
print "<a href='gallery.php?image=$sendimage'><img src=images2/$sendimage.gif>";
?>
Any ideas??