View Full Version : Populating drop down with filenames from the server

01-17-2008, 04:24 PM
I'm trying to create a drop down menu (form object) that lists the filenames of some photos in a directory (called "images").

The drop down needs to populate with these filenames and the user will select the photo they would like to attach to the event they are updating or adding and the image name needs to be written to that rown on the db (column: eventsImage).

Any ideas?

01-17-2008, 04:52 PM
Use glob() to get the filenames, then build the form tag with that array, then when the form is submitted the filename will be available via $_POST or $_GET to insert into your database.

01-17-2008, 05:55 PM
Thanks, Fumigator!