...

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



lilbadger25
01-17-2008, 03: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?

Fumigator
01-17-2008, 03: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.

lilbadger25
01-17-2008, 04:55 PM
Beauty.
Thanks, Fumigator!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum