473,322 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 1489
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
by: Dmitriy Iassenev | last post by:
hi, I found an interesting thing in operator behaviour in C++ : int i=1; printf("%d",i++ + i++); I think the value of the expression "i++ + i++" _must_ be 3, but all the compilers I tested...
7
by: Anon Email | last post by:
Hi people, I'm playing around with Bartosz Milewski's code at the moment, and I got the following strange results upon execution of the code included further below. Please be aware that I...
3
by: George Hardy IV | last post by:
Hello all, I have two forms in my project... one form allows me to use the arrow keys to move and delete controls on my form. the other form does NOT allow me to delete controls or move them...
1
by: hansolox1 | last post by:
The following program simply sets the icon of a form called form1. When I get the name of the embedded icon using GetManifestResourceNames(), I store the name in a string variable called s. The...
6
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to...
2
by: Antonio | last post by:
Good morning, everyone. Here is the strange behavior: I have a datagrid (dgPIs) with paging enabled. When I click to view any page in the grid, it runs the private void lnkIPReg method,...
10
by: John Kraft | last post by:
Hello all, I'm experiencing some, imo, strange behavior with the StreamReader object I am using in the code below. Summary is that I am downloading a file from a website and saving it to disk...
3
by: Chuck Renner | last post by:
Please help! This MIGHT even be a bug in PHP! I'll provide version numbers and site specific information (browser, OS, and kernel versions) if others cannot reproduce this problem. I'm...
3
by: TC | last post by:
I have a form which I'd like to display as a sizable dialog box. The behavior I get when I use FormBorderStyle = SizableToolWindow is perfect. However, when I use that option, the title bar of my...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.