I need to write out the file path after I select it from a drop down in php.?

gavakie

New member
That selects what populates my dropdown. Now I need to find a way to write out the file path of the files in side the folder I would select from the drop down.

<select name="mydropdown">
<?php
$out1 = '';
if ($handle = opendir($_SERVER['DOCUMENT_ROOT'] . '\files')) {
while (false !== ($file = readdir($handle))) {

if ($file != '.' && $file != '..') {

$fileName = $file;
echo '<option value="' . $file . '">' . $fileName . '</option>';
$out1 .= '<span>"'. $file .'"</span>';
}
}
closedir($handle);
}
?>
</select
 
Back
Top