In this code below:
................
<?php
$dir_name = "/mydir/";
$dir = opendir($dir_name);
$file_list = "<select name=select>";
$file_list .= "<option selected>Select!</option>";
while ($file_name = readdir($dir)) {
if (($file_name != ".") && ($file_name != "..")) {
$file_list .= "<option>$file_name</option>";
}
}
$file_list .= "</select>";
closedir($dir);
?>
..................
I can list the contents of my directory inside a drop down menu. Is just call it:
<? echo "$file_list"; ?>
...................
"But", I need get the selected option in this drop down menu.
How can I do for this ???