473,386 Members | 1,720 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,386 software developers and data experts.

I can not get file uploads to show up when I upload a file

I've a form that starts off like this:
<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">

<p>Email address:<br />
<input type="text" name="totalFormInputs[users][5][email_address]"
value="la******@krubner.com" /></p>

<p>Zip code:<br />
<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>

<p>Personal image:<br />
<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>

Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:

Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =la******@krubner.com
[zip_code] =22902
[time] =1187380627
)

)

)

Why is the file input not show up?

Everything was working fine a month ago, and now it is broke.

Any help is very much appreciated.

Aug 23 '07 #1
12 2180
lawrence k wrote:
I've a form that starts off like this:
<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">

<p>Email address:<br />
<input type="text" name="totalFormInputs[users][5][email_address]"
value="la******@krubner.com" /></p>

<p>Zip code:<br />
<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>

<p>Personal image:<br />
<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>

Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:

Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =la******@krubner.com
[zip_code] =22902
[time] =1187380627
)

)

)

Why is the file input not show up?

Everything was working fine a month ago, and now it is broke.

Any help is very much appreciated.
Nothing entered into the field? If it's empty, nothing will be returned.

What does print_r($_POST) show?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Aug 23 '07 #2
On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
I've a form that starts off like this:
<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
<p>Email address:<br />
<input type="text" name="totalFormInputs[users][5][email_address]"
value="lawre...@krubner.com" /></p>
<p>Zip code:<br />
<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>
<p>Personal image:<br />
<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>
Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:
Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
Why is the file input not show up?
Everything was working fine a month ago, and now it is broke.
Any help is very much appreciated.

Nothing entered into the field? If it's empty, nothing will be returned.

What does print_r($_POST) show?

Good question.

print_r($_POST) gives me this:

Array
(
[totalFormInputs] =Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =l*******@krubner.com
[zip_code] =22902
[time] =1187380627
)

)

)

[day] =05
[month] =07
[year] =2006
[choiceMade] =Array
(
[0] =createRecordsForMultipleDatabaseTables
)

)
I click the browse button (by the "file" input) and choose a JPEG
called "car_derby.jpg". But it doesn't show up in POST.

Why?


Aug 23 '07 #3
lawrence k wrote:
On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>lawrence k wrote:
>>I've a form that starts off like this:
<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
<p>Email address:<br />
<input type="text" name="totalFormInputs[users][5][email_address]"
value="lawre...@krubner.com" /></p>
<p>Zip code:<br />
<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>
<p>Personal image:<br />
<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>
Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:
Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
Why is the file input not show up?
Everything was working fine a month ago, and now it is broke.
Any help is very much appreciated.
Nothing entered into the field? If it's empty, nothing will be returned.

What does print_r($_POST) show?


Good question.

print_r($_POST) gives me this:

Array
(
[totalFormInputs] =Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =l*******@krubner.com
[zip_code] =22902
[time] =1187380627
)

)

)

[day] =05
[month] =07
[year] =2006
[choiceMade] =Array
(
[0] =createRecordsForMultipleDatabaseTables
)

)
I click the browse button (by the "file" input) and choose a JPEG
called "car_derby.jpg". But it doesn't show up in POST.

Why?



Are you sure the field is still within the form? Or did you perhaps
move the </formback too far?

Does the HTML validate?

If the HTML is correct, it should show up in the $_POST variable. But
since it isn't, you have an HTML problem - not a PHP one.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Aug 23 '07 #4
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
I've a form that starts off like this:
<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
<p>Email address:<br />
<input type="text" name="totalFormInputs[users][5][email_address]"
value="lawre...@krubner.com" /></p>
<p>Zip code:<br />
<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>
<p>Personal image:<br />
<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>
Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:
Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
Why is the file input not show up?
Everything was working fine a month ago, and now it is broke.
Any help is very much appreciated.
Nothing entered into the field? If it's empty, nothing will be returned.
What does print_r($_POST) show?
Good question.
print_r($_POST) gives me this:
Array
(
[totalFormInputs] =Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
[day] =05
[month] =07
[year] =2006
[choiceMade] =Array
(
[0] =createRecordsForMultipleDatabaseTables
)
)
I click the browse button (by the "file" input) and choose a JPEG
called "car_derby.jpg". But it doesn't show up in POST.
Why?

Are you sure the field is still within the form? Or did you perhaps
move the </formback too far?

Does the HTML validate?

If the HTML is correct, it should show up in the $_POST variable. But
since it isn't, you have an HTML problem - not a PHP one.

You can see the form here:

http://www.bluewalldev.com/secondroad/profile.php?id=5&formName=my_story_edit.htm

I apologize that the site is so rough. We are at an early point of
construction. The site is ultimately suppose to be an online social
network for people recovering from addiction.

Aug 23 '07 #5
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
I've a form that starts off like this:
<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
<p>Email address:<br />
<input type="text" name="totalFormInputs[users][5][email_address]"
value="lawre...@krubner.com" /></p>
<p>Zip code:<br />
<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>
<p>Personal image:<br />
<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>
Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:
Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
Why is the file input not show up?
Everything was working fine a month ago, and now it is broke.
Any help is very much appreciated.
Nothing entered into the field? If it's empty, nothing will be returned.
What does print_r($_POST) show?
Good question.
print_r($_POST) gives me this:
Array
(
[totalFormInputs] =Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
[day] =05
[month] =07
[year] =2006
[choiceMade] =Array
(
[0] =createRecordsForMultipleDatabaseTables
)
)
I click the browse button (by the "file" input) and choose a JPEG
called "car_derby.jpg". But it doesn't show up in POST.
If the HTML is correct, it should show up in the $_POST variable. But
since it isn't, you have an HTML problem - not a PHP one.
That is a good point. I usually leave validation to the graphic
designer, but we might have to do it early in this case, to figure out
this problem.

Aug 23 '07 #6
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
I've a form that starts off like this:
<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
<p>Email address:<br />
<input type="text" name="totalFormInputs[users][5][email_address]"
value="lawre...@krubner.com" /></p>
<p>Zip code:<br />
<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>
<p>Personal image:<br />
<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>
Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:
Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
Why is the file input not show up?
Everything was working fine a month ago, and now it is broke.
Any help is very much appreciated.
Nothing entered into the field? If it's empty, nothing will be returned.
What does print_r($_POST) show?
Good question.
print_r($_POST) gives me this:
Array
(
[totalFormInputs] =Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
[day] =05
[month] =07
[year] =2006
[choiceMade] =Array
(
[0] =createRecordsForMultipleDatabaseTables
)
)
I click the browse button (by the "file" input) and choose a JPEG
called "car_derby.jpg". But it doesn't show up in POST.
Why?

Are you sure the field is still within the form? Or did you perhaps
move the </formback too far?

Does the HTML validate?
Hmm, no.

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.bluewalldev.com%2Fsecon droad%2Fprofile.php%3Fid%3D5%26formName%3Dmy_story _edit.htm&charset=%28detect+automatically%29&docty pe=Inline&group=0

The errors are mostly missing alt tags on the images and some li tags
used outside of ul tags. I can't see how it would effect one input in
the middle of a form, as opposed to all the inputs on a form, but I
suppose we should clean this up. It'll be next week before we get to
it, I suspect.


Aug 23 '07 #7
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
I've a form that starts off like this:
<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
<p>Email address:<br />
<input type="text" name="totalFormInputs[users][5][email_address]"
value="lawre...@krubner.com" /></p>
<p>Zip code:<br />
<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>
<p>Personal image:<br />
<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>
Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:
Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
Why is the file input not show up?
Everything was working fine a month ago, and now it is broke.
Any help is very much appreciated.
Nothing entered into the field? If it's empty, nothing will be returned.
What does print_r($_POST) show?
Good question.
print_r($_POST) gives me this:
Array
(
[totalFormInputs] =Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
[day] =05
[month] =07
[year] =2006
[choiceMade] =Array
(
[0] =createRecordsForMultipleDatabaseTables
)
)
I click the browse button (by the "file" input) and choose a JPEG
called "car_derby.jpg". But it doesn't show up in POST.
Why?

Are you sure the field is still within the form? Or did you perhaps
move the </formback too far?

Does the HTML validate?

If the HTML is correct, it should show up in the $_POST variable. But
since it isn't, you have an HTML problem - not a PHP one.

What's even more odd is that I'm getting the correct results in
$_FILES. The temp name of the file is there. But it doesn't show up in
$_POST. What is that about?


Aug 23 '07 #8
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
I've a form that starts off like this:
<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
<p>Email address:<br />
<input type="text" name="totalFormInputs[users][5][email_address]"
value="lawre...@krubner.com" /></p>
<p>Zip code:<br />
<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>
<p>Personal image:<br />
<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>
Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:
Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
Why is the file input not show up?
Everything was working fine a month ago, and now it is broke.
Any help is very much appreciated.
Nothing entered into the field? If it's empty, nothing will be returned.
What does print_r($_POST) show?
Good question.
print_r($_POST) gives me this:
Array
(
[totalFormInputs] =Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
[day] =05
[month] =07
[year] =2006
[choiceMade] =Array
(
[0] =createRecordsForMultipleDatabaseTables
)
)
I click the browse button (by the "file" input) and choose a JPEG
called "car_derby.jpg". But it doesn't show up in POST.
Why?

Are you sure the field is still within the form? Or did you perhaps
move the </formback too far?

Does the HTML validate?

If the HTML is correct, it should show up in the $_POST variable. But
since it isn't, you have an HTML problem - not a PHP one.
This is what I get if I do print_r($_FILES):

Array
(
[totalFormInputs] =Array
(
[name] =Array
(
[users] =Array
(
[5] =Array
(
[upload_file] =car_derby.jpg
)

)

)

[type] =Array
(
[users] =Array
(
[5] =Array
(
[upload_file] =image/jpeg
)

)

)

[tmp_name] =Array
(
[users] =Array
(
[5] =Array
(
[upload_file] =/tmp/phpiBxJrN
)

)

)

[error] =Array
(
[users] =Array
(
[5] =Array
(
[upload_file] =0
)

)

)

[size] =Array
(
[users] =Array
(
[5] =Array
(
[upload_file] =32302
)

)

)

)

)


That's what I would expect. It's bizzare, I get the right results in
$_FILES, but not in $_POST. How is that possible?



Aug 23 '07 #9
lawrence k wrote:
This is what I get if I do print_r($_FILES):
...

That's what I would expect. It's bizzare,
Its not bizzare. Its normal...
I get the right results in
$_FILES, but not in $_POST. How is that possible?
Cause youre provider has updated PHP. Older versions also send data of
$_FILES within $_POST. But its not a go idea to hold the data in 2 Points.

The manual says that usage of $_FILES is the prefered way since a long
time. If you would have looked in the manual before you write your
Postings, you come surely faster to the goal.

Ulf

--
_,
_(_p Ulf [Kado] Kadner
\<_) Mitglied der Freizeitvögel? ;-)
^^
Aug 23 '07 #10
lawrence k wrote:
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
>lawrence k wrote:
>>On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
I've a form that starts off like this:
<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
<p>Email address:<br />
<input type="text" name="totalFormInputs[users][5][email_address]"
value="lawre...@krubner.com" /></p>
<p>Zip code:<br />
<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>
<p>Personal image:<br />
<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>
Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:
Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
Why is the file input not show up?
Everything was working fine a month ago, and now it is broke.
Any help is very much appreciated.
Nothing entered into the field? If it's empty, nothing will be returned.
What does print_r($_POST) show?
Good question.
print_r($_POST) gives me this:
Array
(
[totalFormInputs] =Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
[day] =05
[month] =07
[year] =2006
[choiceMade] =Array
(
[0] =createRecordsForMultipleDatabaseTables
)
)
I click the browse button (by the "file" input) and choose a JPEG
called "car_derby.jpg". But it doesn't show up in POST.
Why?
Are you sure the field is still within the form? Or did you perhaps
move the </formback too far?

Does the HTML validate?

If the HTML is correct, it should show up in the $_POST variable. But
since it isn't, you have an HTML problem - not a PHP one.

This is what I get if I do print_r($_FILES):

Array
(
[totalFormInputs] =Array
(
[name] =Array
(
[users] =Array
(
[5] =Array
(
[upload_file] =car_derby.jpg
)

)

)

[type] =Array
(
[users] =Array
(
[5] =Array
(
[upload_file] =image/jpeg
)

)

)

[tmp_name] =Array
(
[users] =Array
(
[5] =Array
(
[upload_file] =/tmp/phpiBxJrN
)

)

)

[error] =Array
(
[users] =Array
(
[5] =Array
(
[upload_file] =0
)

)

)

[size] =Array
(
[users] =Array
(
[5] =Array
(
[upload_file] =32302
)

)

)

)

)


That's what I would expect. It's bizzare, I get the right results in
$_FILES, but not in $_POST. How is that possible?


That's right... I shouldn't try to answer at midnight after I've been
out with the guys... :-)

Yes, it goes in the $_FILES array, not $_POST.

Once I got some sleep and looked at this again this morning, it was
obvious :-). Sorry to steer you down the wrong path.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Aug 23 '07 #11
On Aug 23, 8:55 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
I've a form that starts off like this:
<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
<p>Email address:<br />
<input type="text" name="totalFormInputs[users][5][email_address]"
value="lawre...@krubner.com" /></p>
<p>Zip code:<br />
<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>
<p>Personal image:<br />
<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>
Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:
Array
(
[users] =Array
(
[5] =Array
(
[description] =I grew up in New Jersey.
[email_address] =lawre...@krubner.com
[zip_code] =22902
[time] =1187380627
)
)
)
Why is the file input not show up?
Everything was working fine a month ago, and now it is broke.
Any help is very much appreciated.
If the HTML is correct, it should show up in the $_POSTvariable. But
since it isn't, you have an HTML problem - not a PHP one.

[bunch of stuff snipped]
That's what I would expect. It's bizzare, I get the right results in
$_FILES, but not in $_POST. How is that possible?

That's right... I shouldn't try to answer at midnight after I've been
out with the guys... :-)

Yes, it goes in the $_FILESarray, not $_POST.

Once I got some sleep and looked at this again this morning, it was
obvious :-). Sorry to steer you down the wrong path.

I'm confused about this. How does one associate an upload with
database info? In PHP 4, you could have a form that allowed multiple
form uploads with multiple fields for inputting multiple info:

----------------
Caption your images:

1.) caption input, file input
2.) caption input, file input
3.) caption input, file input
4.) caption input, file input
-----------------

In PHP 4, with a form like this, you knew which file went with which
caption, because the whole 2 dimensional array would show up in
$_POST.

How do you figure out the relationship in PHP5, if the files never
show up in $_POST? Does PHP 5 restrict you to just uploading one file
at a time, if you want to caption the file at the same time?


Sep 19 '07 #12
On Sep 19, 1:14 pm, lawrence k <lkrub...@geocities.comwrote:
On Aug 23, 8:55 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
lawrence k wrote:
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
>lawrence k wrote:
>>On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>>>lawrence k wrote:
>>>>I've a form that starts off like this:
>>>><form method="post" action="profile.php?
>>>>id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
>>>> <p>Email address:<br />
>>>> <input type="text" name="totalFormInputs[users][5][email_address]"
>>>>value="lawre...@krubner.com" /></p>
>>>> <p>Zip code:<br />
>>>> <input type="text" name="totalFormInputs[users][5][zip_code]"
>>>>value="22902" /></p>
>>>> <p>Personal image:<br />
>>>> <input type="file" name="totalFormInputs[users][5][upload_file]" /></
>>>>p>
>>>>Oddly enough, the "upload_file" has suddenly disappeared from the
>>>>uploaded array. When I hit $totalFormInputs with print_r, this is what
>>>>I get:
>>>>Array
>>>>(
>>>> [users] =Array
>>>> (
>>>> [5] =Array
>>>> (
>>>> [description] =I grew up in New Jersey.
>>>> [email_address] =lawre...@krubner.com
>>>> [zip_code] =22902
>>>> [time] =1187380627
>>>> )
>>>> )
>>>>)
>>>>Why is the file input not show up?
>>>>Everything was working fine a month ago, and now it is broke.
>>>>Any help is very much appreciated.
>If the HTML is correct, it should show up in the $_POSTvariable. But
>since it isn't, you have an HTML problem - not a PHP one.
[bunch of stuff snipped]
That's what I would expect. It's bizzare, I get the right results in
$_FILES, but not in $_POST. How is that possible?
That's right... I shouldn't try to answer at midnight after I've been
out with the guys... :-)
Yes, it goes in the $_FILESarray, not $_POST.
Once I got some sleep and looked at this again this morning, it was
obvious :-). Sorry to steer you down the wrong path.

I'm confused about this. How does one associate an upload with
database info? In PHP 4, you could have a form that allowed multiple
form uploads with multiple fields for inputting multiple info:

----------------
Caption your images:

1.) caption input, file input
2.) caption input, file input
3.) caption input, file input
4.) caption input, file input
-----------------

In PHP 4, with a form like this, you knew which file went with which
caption, because the whole 2 dimensional array would show up in
$_POST.

How do you figure out the relationship in PHP5, if the files never
show up in $_POST? Does PHP 5 restrict you to just uploading one file
at a time, if you want to caption the file at the same time?

No answers? I'm surprised by this. I assume I'm not the only PHP
programmer allowing people to upload more than one file at a time. I
had an easy enough time in PHP 4 but I can't figure out how to do this
in PHP 5. If an upload file doesn't appear in $_POST, how do you
associate the file info in $_POST?

Sep 21 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
5
by: Kikoz | last post by:
Hi all. I assume that if the user uploads a file from aspx page IIS will put all future requests to the same page from other users in a line and all of them will be waiting until this upload...
3
by: darrel | last post by:
My understanding is that using the FILE form element to allow a file upload is limited to one unique file per page. Is that correct? Any thoughts on how best to design an interface to allow...
4
by: Jim Michaels | last post by:
after a file upload, $_FILES is not populated but $_POST is. what's going on here? $_POST=C $_POST=C $_POST=C $_POST=C:\\www\\jimm\\images\\bg1.jpg $_FILES= $_FILES= $_FILES=
8
by: mpar612 | last post by:
Hello, I am a newbie to PHP, MySQL. I am trying to create a basic file upload form. I want to get that working and then I want to integrate that into a form that will rename the file and save...
5
by: LtCommander | last post by:
Hello all, 1. I am a little new to ASP.NET, so please bear with me. 2. I am trying to create a very simple website which requires an upload box (end user file sizes may be anywhere between 1MB...
3
by: markus.rietzler | last post by:
i want to do (multiple) file upload(s) and display a progress bar. with firefox and safari it is no problem at all. only IE makes some problems. my script is based on ajax-uploader, which can be...
6
by: Emmanuel Petit | last post by:
First of all I am rather new into PHP. I use php 5 and I am putting together a web site for a local association I belong too. Most of the site is okay, except for this problem : I need to be...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.