<?php
$folder = '/path/to/folder';
echo "<select name=\"folder\">\n";
if ($dh = opendir($folder)) {
while (false !== ($file = readdir($dh))) {
if (is_dir($file) && $file != '..' && $file != '.') {
echo "<option value=\"$file\">$file</option>\n";
}
}
closedir($dh);
}
echo "</select>\n";
?>
i think thats what you are after.