468,296 Members | 1,270 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,296 developers. It's quick & easy.

Strange behavior passing file from form...

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
2 1329
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
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.

Similar topics

36 posts views Thread by Dmitriy Iassenev | last post: by
7 posts views Thread by Anon Email | last post: by
3 posts views Thread by George Hardy IV | last post: by
2 posts views Thread by Antonio | last post: by
10 posts views Thread by John Kraft | last post: by
3 posts views Thread by Chuck Renner | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.