By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,828 Members | 1,356 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,828 IT Pros & Developers. It's quick & easy.

Strange behavior passing file from form...

P: n/a
Hello,

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
"multipart/form-data"

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,
Jeff
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
File information is in $_FILES['NameOfTheInputFileTag']

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

print_r($_FILES['NameOfTheInputFileTag']);

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

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
"multipart/form-data"

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.

Jul 17 '05 #2

P: n/a
OK,

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?

Jeff



On Mon, 25 Oct 2004 04:09:13 GMT, "Daedalus" <da*********@hotmail.com>
wrote:
File information is in $_FILES['NameOfTheInputFileTag']

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

print_r($_FILES['NameOfTheInputFileTag']);

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

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
"multipart/form-data"

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.


Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.