Connecting Tech Pros Worldwide Help | Site Map

Populating drop down menu with remote file list

Newbie
 
Join Date: Aug 2006
Posts: 1
#1: Aug 7 '06
Hi,

A bit of a PHP newbie here who could do with some help. I have searched through many forums and resources trying to find a solution for a problem I am trying to resolve.

I wish to populate a drop down menu with a list of files that sit remotely on a server. Basically the user uploads media files to a server directory via FTP and then needs to add a record to a database from an insert form. All this works great but I can't seem to get the list box to populate with the file list from FTP upload.

I'm tearing my hair out trying to find a solution. Any help would be most gratefully received.

Many thanks in advance.
Paul.
KUB365's Avatar
Administrator
 
Join Date: Jul 2005
Location: Portland, OR
Posts: 965
#2: Aug 11 '06

re: Populating drop down menu with remote file list


Read the file in line by line into an array. Each increment of the array gets one line of the file. Next do a loop on the array and output it with the dropdown html code (SELECT -> OPTION)

Give it a shot, if you don't get it, just paste the code to what you have done and we'll help you out some more.
Reply