Re: Re: Re: drop down menu populated from a directory
| From: | Daniel Clark | Date: | Mon, 31 May 2004 17:36:04 +0000 |
| Subject: | Re: Re: Re: drop down menu populated from a directory | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187290@lists.php.net to get a copy of this message | ||
With the SELECT drop down, you'd need a submit button, and then the value of $file would be
passed to the next page and read. There you
could open that file.
>>So I made my code:
>>
>><?php
>>if ($handle = opendir('../../../mov')) {
>> while (false !== ($file = readdir($handle)))
>>
>> if ($file != '.' && $file != '..')
>>
>> $fileName = str_replace('.mov', '', $file);
>> echo '<option value="' . $file . '">' .
>> $fileName .
>>'</option>';
>> closedir($handle);
>>}
>>?>
>>
>>And it does display the name in the menu... so that is a good start,
>>but the link doesn't work when selected. So I am assuming hte code does
>>need those brackets, and I rather need to open the opening one...
>>
>>d