If I have a user input a file in an html form for uploading, is there any way
that I can pull the name of the file that was uploaded out some how?

For example, I have this code for my form:

        <form ENCTYPE="multipart/form-data"  action="empfunc.phtml"
method="post">
        Upload a file:
        <BR>NOTE: Max file size is <?print($my_max_file_size / 1024);?>KB
        <br><INPUT NAME="the_file" TYPE="file" SIZE="35"><br>
        <input type="hidden" name="upload" value="true">
        <input type="submit" Value="Update">
        </form>

When the form is processed, the file turns into a variable called $the_file, if
I print out the variable's contents I get a bunch of alphanumeric characters
that I assume are how php is encoding the file. However, I want to somehow get
the filename of the file, is there a way to do this without having the person
who uploads their file specifically type in the file name in another field?

Thanks for any help,

Zara

Reply via email to