473,326 Members | 2,099 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,326 software developers and data experts.

Query on multipart/form-data.

dmjpro
2,476 2GB
A Question was in my mind for a long day.
But today suddenly knocks my mind again.
So I am asking that Question here...Please Experts answer my Question.

Expand|Select|Wrap|Line Numbers
  1. <form enctype="multipart/form-data" action = "XYZ">
  2. <input type = file name=file1></input>
  3. <input type = file name=file2></input>
  4. <input type = file name = file3></input>
  5. <input type = text name =text1></input>
  6. <input type = text name =text1></input>
  7. <input type = hidden name =hidden1></input>
  8. <input type = hidden name =hidden2></input>
  9. <input type=submit></input>
  10. </form>
  11.  
All of us know the multipart/form-data handled with special care.
I mean in different way.
Look at my HTML code carefully.
See, there are there File Upload fields, two Text Box nd two Hidden fields.
Now my Question is that if I submit this form then only three File Upload datas will go to the Target Action.
But I want to make my Target available rest four Fields.
How can I do that.
Actually in Normal way it is not Possible.
I tested but I failed.
So Experts, please help.

Kind regards,
Dmjpro.
Sep 12 '07 #1
6 3108
A Question was in my mind for a long day.
But today suddenly knocks my mind again.
So I am asking that Question here...Please Experts answer my Question.

Expand|Select|Wrap|Line Numbers
  1. <form enctype="multipart/form-data" action = "XYZ">
  2. <input type = file name=file1></input>
  3. <input type = file name=file2></input>
  4. <input type = file name = file3></input>
  5. <input type = text name =text1></input>
  6. <input type = text name =text1></input>
  7. <input type = hidden name =hidden1></input>
  8. <input type = hidden name =hidden2></input>
  9. <input type=submit></input>
  10. </form>
  11.  
All of us know the multipart/form-data handled with special care.
I mean in different way.
Look at my HTML code carefully.
See, there are there File Upload fields, two Text Box nd two Hidden fields.
Now my Question is that if I submit this form then only three File Upload datas will go to the Target Action.
But I want to make my Target available rest four Fields.
How can I do that.
Actually in Normal way it is not Possible.
I tested but I failed.
So Experts, please help.

Kind regards,
Dmjpro.
I used this (which is a php script so that I can see what is reported server-side) and it worked fine:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. print_r($_FILES);
  3. print_r($_POST);
  4. ?>
  5. <html>
  6.   <head>
  7.   </head>
  8.   <body> 
  9. <form enctype="multipart/form-data" method="post" action="this.php">
  10. <input type = "file" name="file1"></input>
  11. <input type = "file" name="file2"></input>
  12. <input type = "file" name ="file3"></input>
  13. <input type = "text" name ="text1"></input>
  14. <input type = "text" name ="text2"></input>
  15. <input type = "hidden" name ="hidden1"></input>
  16. <input type = "hidden" name ="hidden2"></input>
  17. <input type="submit"></input>
  18. </form>
  19.   </body>
  20. </html>
  21.  

You should note in your post that the name of the text fields didn't vary.

Also, the file should be named whatever you have in the action attribute. I chose "this.php".
Sep 12 '07 #2
dmjpro
2,476 2GB
I used this (which is a php script so that I can see what is reported server-side) and it worked fine:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. print_r($_FILES);
  3. print_r($_POST);
  4. ?>
  5. <html>
  6.   <head>
  7.   </head>
  8.   <body> 
  9. <form enctype="multipart/form-data" method="post" action="this.php">
  10. <input type = "file" name="file1"></input>
  11. <input type = "file" name="file2"></input>
  12. <input type = "file" name ="file3"></input>
  13. <input type = "text" name ="text1"></input>
  14. <input type = "text" name ="text2"></input>
  15. <input type = "hidden" name ="hidden1"></input>
  16. <input type = "hidden" name ="hidden2"></input>
  17. <input type="submit"></input>
  18. </form>
  19.   </body>
  20. </html>
  21.  

You should note in your post that the name of the text fields didn't vary.

Also, the file should be named whatever you have in the action attribute. I chose "this.php".

Your this.php canget the parameter values of four fieds except File Tags?
Please let me know.

Kind regards,
Dmjpro.
Sep 13 '07 #3
I'm not sure what you're talking about. There are no file tags. The input tags which have type="file" are available via the $_FILES array in PHP, if that's what you're talking about.
Sep 13 '07 #4
dmjpro
2,476 2GB
I'm not sure what you're talking about. There are no file tags. The input tags which have type="file" are available via the $_FILES array in PHP, if that's what you're talking about.
Yup!
But if I do enctype=multipart/form-data then only my Action gets the information abut File Tags.
But how can I get the values of rest four fields?
This is my Question.
Please help me.

Kind regards,
Dmjpro.
Sep 13 '07 #5
Again, there's no such thing as file tags. If you run my code, fill in the values, and click the button, you'll see an array of all information submitted including every single field in the form.

Try it.
Sep 13 '07 #6
dmjpro
2,476 2GB
Again, there's no such thing as file tags. If you run my code, fill in the values, and click the button, you'll see an array of all information submitted including every single field in the form.

Try it.
I will try it on my Server Side Scripting.

Kind regards,
Dmjpro.
Sep 13 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Damien | last post by:
Hi to all, After hours of attempts and "googling", I'm still pulling my hair off my head when I try to send multipart html emails. It "works" on PCs with Outlook when I juste send a single...
4
by: Hunter Peress | last post by:
I have been unable to write a script that can do (and receieve) a multipart form upload. Also, it seems that there really are differences between python's implementation and else's. Can someone...
0
by: Travis Pupkin | last post by:
Hi, I have a form that triggers the sending of an e-mail via CDOSYS. I'd like to make this a nice HTML-formatted multipart message, but for some reason the text version is coming through blank....
4
by: John Fereira | last post by:
So, one of the limitations of multipart-form handling is that when an <input type="file" ..> tag is used it will bring up a window which allows a user to select a file for upload but won't allow...
2
by: Der tolle Emil | last post by:
Hi! I wrote a little function to send emails which works quite well. I already managed to send attachments correctly (also more than 1 per email) but I am not able to send a HTML mail containing...
4
by: yoram.ayalon | last post by:
Hi, I need to create a multipart request to UPS manifest upload electronic service. UPS wants the request to consist of a series of headers and bodies, and its not clear how can I use the...
4
by: DMG | last post by:
I have <identity impersonate = "true" /& <authentication mode="Windows"/in the web.config. This is a 2.0 site. My Goal: I want to simply have the user browse to a file on a mapped drive and get...
2
by: madmak | last post by:
Hi, I am a noob with PHP and need some asistance regarding PHP and lotus notes. I am trying to create a multipart message in PHP to send mail via lotus notes. Here is the code snippet. ...
6
by: fnoppie | last post by:
Hi, I am near to desperation as I have a million things to get a solution for my problem. I have to post a multipart message to a url that consists of a xml file and an binary file (pdf)....
0
by: pezkel | last post by:
Hi, For the last two weeks I have been looking for a solid way to create an asp page that can upload a binary file and an xml file in a multipart message to a third party website. I am on the...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.