Is there a way to populate the values and labels of a list from a directory? I searched the manual, but couldn't find anything specific ... or else I'm not sure how to phrase my question.
<?php
$handle=opendir('products/');
while ($file = readdir($handle)) {
if ($file != "." && $file != ".." && $file !="_notes") {
echo "$file<br>";
}
}
closedir($handle);
?>
I'm building a form for a client to add products to their online store. I'd like to make it simple so they can upload their image to a directory, then choose an image from list/menu populated by that directory. Thx.