Imagine my excitement when I got the following code to display a directory listing of an image upload area.
<?php
$current_dir = 'images/upload/';
$dir = opendir($current_dir);
echo "Upload is $current_dir<br />";
while ($file = readdir($dir))
{
echo "$file<br />";
}
closedir($dir);
?>
But what I really need to do, is put the results of the directory query into a form list field, so that users can select the name of an image file to include in their documents.
Does anyone have any pointers for me?