Help: retrieve form values - multipart/form-data
Hi I have a form that uploads a file the form is like this.
<form enctype="multipart/form-data" method = "post" action="myFile.php">
<input type="file" name="file1">
Now I tried to get the field 'file1' in 'myFile.php' like this
$theFileName = $_POST['file1'];
This returns nothing.
But if i remove the part enctype="multipart/form-data" in the form tag
I get the value. How do I get the value without removing enctype="multipart/form-data"???
$theFileName = $_FILES['file1']['name'];
That just gives the file name though. After the upload the file is stored in the temp directory as $_FILES['file1']['tmpname'] and will be deleted at the end of the script unless you do something with it like email it or file it.
Last edited by bokeh; 08-12-2005 at 10:39 AM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)