2. Set $currentDirectory to complete folder path to base a next folder select list on.
GET
Set $currentDirectory to HTML root path (__DIR__) + $curFolder
POST
- assign hidden form field (selecteddir) to $selecteddir the selected folder.
- use hidden form field (baseDirectory) to create array ($pathArray). delimit on "/"
- if $selecteddir = "gotoparent", pop last array value to reset $selecteddir value.
else push $selecteddir to array
- use hidden form field string (baseDirectory) to create the array ($pathArray). delimit on "/"
-Set $currentDirectory by using the array to rebuild a current path string.
For both Get and Post, create the first <option > for the foldert select list as $arrsubdir.