[PHP] Re: Directory to array to select box...

2002-04-05 Thread Michael Virnstein
ok, i'll try to help, but first use "while (false !== ($file = readdir($dir))". ;) why do you need hidden fields on that page? to determine which file the user has selected? hmmm...ok, let's see: The user sees your form, selects the desired file and submits the form. Now the page processing the re

[PHP] Re: Directory to array to select box...

2002-04-05 Thread Jas
Ok I tried a different way to do it and this is the resulting code... I still need to be able to make some hidden fields so the contents of the item selected may be passed to another script which will stick the path of the file into a database table if anyone wants to give me a hand with that part

[PHP] Re: Directory to array to select box...

2002-04-05 Thread Michael Virnstein
how about that: $file\n"; } ?> in your example there are two mistakes: 1. "while ($file = readdir($dir))" is wrong and should be "while (false !== ($file = readdir($dir))". (see php manual readdir) 2. "$file_count .="$file";" is not inside the loop, so you will only get the