can someone help me assign the selection of a drop down menu to a variable? the variable i need to store the selection in is scanoption.
can anyone help with this?
Code:
<form name="scanoption">
<p align="center">
<p align="center">Name: <input name="scanoption" type="text" size="45">
<select>
<?php
if ($handle = opendir('/var/tmp')) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
$list[] = $entry;
}
}
closedir($handle);
}
natcasesort($list);
sort($list);
foreach($list as $file) {
echo "<option value='$file'>$file</option> \n";
#echo "<input name="scanoption" type="text" size="45">";
$scanoption = '$file';
}
?>
</select>