SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to retrieve form field value if form is EncType=multipart/form-data?

    Hello,

    I have a form with some fields, some are regular inputs and drop-down list, and one is input file. I managed to save the file on my server and save the form data in my database, except the value from the file input. I need to save the name of the uploaded file to my db too, but the field enters empty (even if the file uploads fine). I've tried saving the data to the db as
    Code PHP:
    $imgthumbname = $_FILES['imgthumbname']['name'];
    But no luck...

    any idea?

    Thanks in advance....
    Guillermo

  2. #2
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My bad... I found the problem... the above method works fine, it was that the insert code I was executing it before the declaration.
    Guillermo


Bookmarks

Posting Permissions

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