How to grab a file name

Discussion in 'PHP' started by chrisj, Oct 7, 2014.

  1. #1
    In a php upload Form when a User chooses an image file to upload,
    the name of the file appears next to the Choose File button (see attachment)
    is it possible to grab that file name, add it to the page, and proceed with completing the Form?
     
    chrisj, Oct 7, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Yes, but not with PHP - javascript is your friend, if you want it to appear on the page before the picture is already uploaded. It can also display a thumbnail of the file, if you want, or other information, based on what you deem necessary.
     
    PoPSiCLe, Oct 7, 2014 IP
  3. Anveto

    Anveto Well-Known Member

    Messages:
    697
    Likes Received:
    40
    Best Answers:
    19
    Trophy Points:
    195
    #3
    Here is an example on how to do this http://www.itorian.com/2014/01/display-images-and-its-name-size-before.html
     
    Anveto, Oct 8, 2014 IP