Where are you getting the target of ACTION= from? Is it just any one of the <OPTION>s? I don't understand what you're trying to do (and I don't think I'm alone here - you may even be among us).
Can you give a concrete example of what is in the database and how you would like the HTML to look? miguel On Mon, 8 Apr 2002, Jas wrote: > Yeah I have tried $file_name but the problem stems from the while > ($file_name = readdir($dir) being called after the creation of the form in > $file_list. Is there a way to put the ($file_name = readdir($dir) before > the $file_list function? I have tried to do it a couple of different ways > such as making a new variable $files = ($file_name = readdir($dir)) { > if (($file_name != ".") && ($file_name !="..")) { > $file_list .= "<OPTION VALUE=\"$file_name\" > NAME=\"$file_name\">$file_name</OPTION>"; > } > } > but that didn't work, I also tried another thing but so far nothing has > allowed me to create a unique action in the form or a unique name for the > form. > <?php > $dir_name = "/path/to/images/directory/"; > $dir = opendir($dir_name); > $file_list .= "<p><FORM METHOD=\"post\" ACTION=\"**I need this to be a > unique file name**\" NAME=\"$file_name\"><SELECT NAME=\"files\">"; > while ($file_name = readdir($dir)) { > if (($file_name != ".") && ($file_name !="..")) { > $file_list .= "<OPTION VALUE=\"$file_name\" > NAME=\"$file_name\">$file_name</OPTION>"; > } > } > $file_list .= "</SELECT><br><br><INPUT TYPE=\"submit\" NAME=\"submit\" > VALUE=\"select\"></FORM></p>"; > closedir($dir); > ?> > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php