473,231 Members | 1,389 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,231 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 3107
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: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.