Strange behavior passing file from form...

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I don't know where to begin with this as it's kind of a strange error
and I can't figure it out. I've got a form that I pass several
variables to a php page. One of the variables is a file that is
getting uploaded.

The INPUT is type "file" and the form enctype is set to

But what happens, is when it gets to the php page that these vars are
sent too, is the file only shows as a forward slash "/" - This is
really bugging me because all of the other variables get passed with
no problems, so I'm at a loss.

Does anyone have any ideas with the problem that I'm having? I'm using
php 4.2.2 on Apache 2.0.40 and I'm not sure what other info would help
with this.

Thank you in advance for any ideas,

Re: Strange behavior passing file from form...

File information is in $_FILES['NameOfTheInputFileTag']

it's an array. To see what it holds, use:


If it's not the problem, share some code so someone can take look at it.

Quoted text here. Click to load it

Re: Strange behavior passing file from form...


Here is the form input statement:

              <input type="file" name="product_thumb_image" size="32"
maxlength="255" />

Then the next page it goes to, the first thing I call is this:

$d["error"] =  "Filename: " . $d["product_thumb_image_name"];

This then outputs "Filename: /"

But if I put:

$d["error"] = "Test price: " . $d["price"];

it outputs: "Test price: 32.99"

So what I don't understand is why I'm only getting a forward slash "/"
as the filename. That seems really odd.

Does this help at all, or do you need more info?



Quoted text here. Click to load it

Site Timeline