Upload with Firefox

L

Lajos Kuljo

Hi,
I have a little application using lamp (Debian), which uploads files to
the server:

....
echo "<form name='upload' enctype='multipart/form-data'
action='photo_document.php' method='post'>";
echo "<br>File to upload:&nbsp;<input type='file' name='file'
size='100'><br><br>";
....

If I run this script in Firefox 1.0 or in Mozilla 1.7.3-5,
$_POST['file'] gives me only the filename without the path, which is
imho not compatible with the manuals. However in Konqueror 3.3.2 it
works as it should, $_POST['file'] gives the full-path. Earlier versions
of Firefox/Firebird worked OK (like Konqueror does).
I just can't figure out, why it happens, and first of all, how can I
repair this situation.
Can somebody give me a hint?
 
O

Oli Filth

Lajos said:
Hi,
I have a little application using lamp (Debian), which uploads files to
the server:

...
echo "<form name='upload' enctype='multipart/form-data'
action='photo_document.php' method='post'>";
echo "<br>File to upload:&nbsp;<input type='file' name='file'
size='100'><br><br>";
...

If I run this script in Firefox 1.0 or in Mozilla 1.7.3-5,
$_POST['file'] gives me only the filename without the path, which is
imho not compatible with the manuals. However in Konqueror 3.3.2 it
works as it should, $_POST['file'] gives the full-path. Earlier versions
of Firefox/Firebird worked OK (like Konqueror does).
I just can't figure out, why it happens, and first of all, how can I
repair this situation.
Can somebody give me a hint?

If it's working correctly (I'm assuming we're talking about PHP here),
$_POST["file"] shouldn't exist. File details will be in $_FILES["file"].
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top