maybe you should make a plan, first, what to do. ;-)
Thatīs normal if you go to the supermarket, why not on softwaredevelopment?

At 08.04.2002  18:20, you wrote:
>Ok I have it working to a point... how can I impliment a loop to count the
>files in the directory, right now it only pulls the first file into the
>select box.  Here is the code:
>$dir_name = "/path/to/images/directory/on/server/";
>$dir = opendir($dir_name);
echo "<p><FORM METHOD=\"post\" ACTION=\"index_done.php3\" NAME=\"Foo\">";
echo "<SELECT NAME=\"files\">";
// form name not really required, and shouldnīt be a var.
>  while ($file_name = readdir($dir))
>         if (($file_name != ".") && ($file_name !=".."))
>         {
>       echo "<OPTION VALUE=\"$file_name\" 
> NAME=\"my_file[]\">$file_name</OPTION>";
         // how can you get the option name in your next script if you use 
>         } // end if
>  } // end while
>echo "</SELECT><br><br>";
>echo "<INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\"select\"></FORM></p>";
>Thanks, in advance
I know your next Question :) , How to get the selected values in my script 
look for arrays, getting content from arrays.
HTH Oliver

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to