ok that works i used the following code:
$subDirectories = glob("*", GLOB_ONLYDIR);
echo "<strong>Subfolders</strong><br />";
echo "<form name=\"form1\" action=\"./phpslideshow.php?directory=\"ChosenFolder\" method=\"POST\">";
echo "<select name=\"folders\" onChange=\"form1.submit();\">";
echo "<option value=\"Choose a Folder\">Choose a Folder</option>";
foreach ($subDirectories as $folder)
{
echo "<option value=\"" . $folder . "\">" . $folder . "</option>";
}
echo "</select>";
echo "</form>";
that outputs a select box with an entry for each subdirectory. but now i am wondering to put for the form action attribute. basically i want the form action to be the same page i am no with ?directory=chosendirectory appended where chosendirectory is the directory name chosen in the select.
now i knwo that i can access the form variable by saying $POST['folders'] but i can only access that AFTER the form is submitted.
so how can i properly set the form action here?