ok....i ran it and this is what i came up with
your app prints this out
Array
(
[xyz] => 2
[submit] => Submit Query
)
everytime a option is changed and you hit the submit query button it submits and prints out whatever the value of xyz is to the screen....so...theoretically
if i used a for loop that incremented by one each time the while executed, printing out a number for value like value="$i++" then changed dirname to add on whatever folder was selected at the end when the user hits submit it brings up another <select> with the new value of $file in it
ok...i tried this
Code: Select all
<?php
session_start();
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
$dirname = "resids/{$_SESSION['logname']}";
$dh = opendir($dirname) or die("couldn't open directory");
for($i=1; $i=$file; $i++)
{
echo "<select name=\"{$i}\">";
while(!(($file = readdir($dh)) === false))
{
echo "<option";
echo ">$file\n";
}
echo "</select>";
}
closedir($dh);
?>

variable undefined...i chould have guessed that one so then i thought for nested in the while
Code: Select all
<?php
session_start();
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
$dirname = "resids/{$_SESSION['logname']}";
$dh = opendir($dirname) or die("couldn't open directory");
echo "<select name=\"{$i}\">";
while(!(($file = readdir($dh)) === false))
{
for($i=1; $i=$file; $i++)
{
echo "<option";
echo ">$file\n";
}
}
echo "</select>";
closedir($dh);
?>
i still get a variable that is undefined by my E_All...which i dont quite understand and whats worse...now it seems i made a infinate loop

am i getting further away?