If you want to use a PHP script to display your images out of a single folder - here's one that I quickly wrote for you. Let me know if you have any questions about it. Whatever you name this file should have a .php at the end of it so that the php executes properly on the web server.:
<?
////////////////////////////////////////////////////////////////
////////THIS IS A PHP GALLERY SCRIPT FOR A SINGLE FOLDER////////
///////custimize by changing the top three variables////////////
//and the bottom display values - nothing else needs to change//
////////////////////////////////////////////////////////////////
//This can also be an absolute path e.g. /var/www/yourwebsite/htdocs/images
$your_image_directory="images";
//the url of the images folder
$absolute_path_of_directory="http://www.whatever.com/images";
//whatever you name this file
$name_of_this_file="myimages.php";
//opens the directory
$dir = opendir($your_image_directory);
//will store the files in the directory
$files = array();
//looks through the folder
while(($file = readdir($dir)) !== false){
//if we found a file
if (is_file($your_image_directory."/".$file)){
//get size of the image for filtering purpose
$size=getimagesize($your_image_directory."/".$file);
//if the size of width and height is more than 1
if($size[0]>1&&$size[1]>1){
//it's an image
$is_image=1;
//or else
}else{
//it's not an image
$is_image=0;
}
//or else
}else{
//not an image
$is_image=0;
}
//if we found the file is an image
if($is_image){
//put the file in the array
$files[]=$file;
}
}
//close the directory
closedir($dir);
//first file in array
$im=0;
//checks if we have an image request
if(is_numeric($_REQUEST[im])){
//if we do make it the current image
$im=$_REQUEST[im];
}
//if the image is 0 or the first image
if(!$im){
//make the previous image the last image in the array
$prev=count($files)-1;
//or else
}else{
//make the image the previous image in the array
$prev=$im-1;
}
//if we've reached the end of the array
if($im>=(count($files)-1)){
//make the next image the first image in the array
$next=0;
//or else
}else{
//make the next image the next image in the array
$next=$im+1;
}
?>
<center>
<? // DISPLAY THE IMAGE IN AN IFRAME OR WHATEVER ?>
<iframe src="<?=$absolute_path_of_directory?>/<?=$files[$im]?>"
width="200" height="200" style="border:0px;"></iframe>
<br><br>
<? // PREVIOUS BUTTON ?>
<a href='<?=$name_of_this_file?>?im=<?=$prev?>'>[ < < Prev ]</a>
<? // NEXT BUTTON ?>
<a href='<?=$name_of_this_file?>?im=<?=$next?>'>[ Next > > ]</a>
</center>
Abraham