Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Populating drop down with filenames from the server

    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?

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    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.

  • #3
    New Coder
    Join Date
    Jan 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Beauty.
    Thanks, Fumigator!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •