forms with upload files and normal input tags
Posted: Thu Jul 11, 2002 6:16 am
Hi!
I have to do a form that should be used to post some information and (optionally) to upload some files.
When I put the encoding of the form to multipart/form-data I'm able to read the updated files, but I can not access anymore the other input fields of the form as global variables. For example, if the form is:
<form enctype="multipart/form-data" action="send.php" method="post">
<input type="text" name="build" size="20">
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input type="file" name="att" size="19">
<input class="clsButton" type="submit" value="Submit" name="submit">
</form>
I'm not able to read the value of "build".
Do you know how can I read the "build" value without changing the enctype (need to upload files)?
I've been searching for a while, and the only thing that I've found is a comment in the php manual page, saying that when you use multipart/form-data, you should use $HTTP_RAW_POST_DATA to get the value of the variables of your form, but I don't know hot to parse $HTTP_RAW_POST_DATA to get the variables of the form.
Thank you in advance!
Cheers,
I have to do a form that should be used to post some information and (optionally) to upload some files.
When I put the encoding of the form to multipart/form-data I'm able to read the updated files, but I can not access anymore the other input fields of the form as global variables. For example, if the form is:
<form enctype="multipart/form-data" action="send.php" method="post">
<input type="text" name="build" size="20">
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input type="file" name="att" size="19">
<input class="clsButton" type="submit" value="Submit" name="submit">
</form>
I'm not able to read the value of "build".
Do you know how can I read the "build" value without changing the enctype (need to upload files)?
I've been searching for a while, and the only thing that I've found is a comment in the php manual page, saying that when you use multipart/form-data, you should use $HTTP_RAW_POST_DATA to get the value of the variables of your form, but I don't know hot to parse $HTTP_RAW_POST_DATA to get the variables of the form.
Thank you in advance!
Cheers,