When ad_done.php3 is called, it will receive a variable named $files. Change:
<SELECT NAME=\"files\">$file_name"; to: <SELECT NAME=\"files\">"; $files will contain the value of the file selected -----Original Message----- From: Jas [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:36 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Directory to array to select box... Sorry, here is what I have thus far... everything is working except I am just not sure how to pass the result of the users selection to another script, I have added the hidden input type to try and solve it but I think I am doing something wrong, maybe I need to put the hidden input type on the second script to place the contents into the database, here is the code... <?php $dir_name = "/path/to/directory/"; $dir = opendir($dir_name); $file_list .= "<p><FORM METHOD=\"post\" ACTION=\"ad_done.php3\"> <SELECT NAME=\"files\">$file_name"; while ($file_name = readdir($dir)) { if (($file_name != ".") && ($file_name !="..")) { $file_list .= "<OPTION VALUE=\"$file_name\">$file_name</OPTION>"; } } // added hidden field here... and so far it is not getting any value, so i am assuming that i need it on my ad_done.php3 script??? $file_list .= "<INPUT TYPE=\"hidden\" NAME=\"$file_name\" VALUE=\"$file_name\"></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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php