i have an extremely large form that is being submitted to an 'update' page which runs some SQL queries and updates the fields and then redirects back to the original page. everything has been working properly. I'm using $_POST
to send my variables to the update page.
i recently needed to add a <input type='file' />
field to the page. Whenever the user selects a file, the form breaks, and nothing is getting submitted to the next page.
I tried echoing my $_POST
variables on the update page. They come through perfectly as long as the file
field isn't set. If I choose a file, then none of the variables come though.
i'm really stumped as to why this is happening. does anyone have any ideas why. here is an excerpt.
An excerpt of the huge form:
<form enctype="multipart/form-data" method="post" action="editConfirm.php">
.
.
<input type="file" name="new_file" id="new_file" />
<input type='field' width='25px' name='fakeInput' id='fakeInput' value='' />
<input type="hidden" name="compressed_file_id" id="compressed_file_id" value='<? echo $compressedID; ?>' />
And the confirmation page:
echo "New File = ".$_POST['new_file'];
echo "<br />Master Title = ".$_POST['masterTitle'];
echo "<br />Compressed File ID = ".$_POST['compressed_file_id'];
So those all echo properly as long as New File isn't set. If I select a file and submit the form, they all break and nothing comes through.