473,625 Members | 3,329 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Forms Using EncType = Multipart - Text Is Not Passed !

Dear Friends
Hope you all are doing great.

I am using a form to add text data to the database. With this form I
am also using a file field to upload a image file.

To use the first thing that is just data I dont have to write EncType
as it picks the default one. But to use the second one that is to
upload an image. I need to write EncType = "multipart/form-data". When
I do this the text passed from the other text field goes blank.

Why is it happening.

Is it that I cant get text data when I use
EncType="multip art/form-data".

Please help in solving this problem.

Love
Lovely

_______________ _______________ _______________ ____

<tr>
<td width="100%" valign="top">
<form method="POST" action="data_sa ve.asp"
EncType="multip art/form-data">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td width="100%" colspan="2">Add a new Main
Category</td>
</tr>
<tr>
<td width="20%">&nb sp;</td>
<td width="80%"></td>
</tr>
<tr>
<td width="20%">Nam e</td>
<td width="80%"><in put type="text" name="name"
size="43"></td>
</tr>
<tr>
<td width="20%">Ima ge</td>
<td width="80%"><in put type="text"
name="image"></td>
</tr>
<tr>
<td width="20%">Des cription</td>
<td width="80%"><te xtarea rows="2"
name="descripti on" cols="37"></textarea></td>
</tr>
</table>
</div>
<p align="center"> <input type="submit" value="Submit"
name="B1"></p>
<input type="hidden" name="Category" value="0">
<input type="hidden" name="Choice" value="1">
</form>
</td>
</tr>
Jul 20 '05 #1
2 4531
lo************* *****@yahoo.com (Lovely Angel For You) wrote:
Is it that I cant get text data when I use
EncType="multip art/form-data".


Of course you can. Dealing with a text field is much easier than
processing the file field. But exactly how you do that depends on the
server-side technology used and is external to HTML.

HTML only defines how the data is sent - in this case, as a set of
documents inside a multipart message.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2
lo************* *****@yahoo.com (Lovely Angel For You) wrote:
Dear Friends
Hope you all are doing great.

I am using a form to add text data to the database. With this form I
am also using a file field to upload a image file.

To use the first thing that is just data I dont have to write EncType
as it picks the default one. But to use the second one that is to
upload an image. I need to write EncType = "multipart/form-data". When
I do this the text passed from the other text field goes blank.

Why is it happening.


Because your server-side process (you didn't say what you're using)
conveniently sets Request.Form variables (or the equivalent) for you
if and only if you use the default enctype (as is the case in Active
Server Pages). Otherwise, you're on your own to parse them out of the
request.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #3

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

Similar topics

1
1355
by: Lovely Angel For You | last post by:
Dear Friends Hope you all are doing great. I am using a form to add text data to the database. With this form I am also using a file field to upload a image file. To use the first thing that is just data I dont have to write EncType as it picks the default one. But to use the second one that is to upload an image. I need to write EncType = "multipart/form-data". When I do this the text passed from the other text field goes blank.
3
29094
by: Steven K | last post by:
Hello, I am using an asp page (upload.asp) to gather information and to upload files to the web server using SoftArtisans SAUpload Tool. In the first page (upload.asp), I have a form for gathering info with the following: <form method="POST" action="upload_ok.asp" name="frmUpload" enctype="multipart/form-data"> <input type="hidden" name="cmdSearch" value="SearchValue"> <input type="hidden" name="cmdName" value="NameValue">
1
1833
by: Asha | last post by:
greetings, i need to upload an .xls file using a secure connection. so i though of using https... can i know how this can be done?
9
2486
by: opt_inf_env | last post by:
Hi. I found out that when one creates form which should upload files one needs to use: enctype="multipart/form-data" In other cases one needs to use: enctype="application/x-www-form-urlencoded" However, what is still not clear to me is what value for enctype I need to use if I want to create form which should both contains text fields
2
1901
dmjpro
by: dmjpro | last post by:
<form name ="" method = "" action = "" enctype = ""> if i write in js .... form_name.method= ""; //it wotks form_name.action ="" //it works form_name.enctype = "" //it does not work
4
32517
by: vunet.us | last post by:
Hi all, I am converting my app to AJAX-based. I have a form that submits some data including images. When I use AJAX XmlHttpRequest I am unable to submit the form with ENCTYPE="multipart/form-data" (error 500). Without ENCTYPE="multipart/form-data", everything goes well. I think there is a header I must use in addition, but I cannot seem to find a good solution. Can you suggest? Thank you. Here is a part of xmlhttp request where I set...
21
34381
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 Uploading files from a local computer to a remote web server has many useful purposes, the most obvious of which is the sharing of files. For example, you upload images to a server to share them with other people over the Internet. Perl comes ready equipped for uploading files via the CGI.pm module, which has long been a core module and allows users...
2
7807
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
I have a MasterPage. The MasterPage actually contains the <formtag which is used throughout the site. On just certain pages that use that MasterPage, I need the "enctype" for the <formtag to be set to: enctype="multipart/form-data" On the rest of the pages, I do not need this. How can my specific ASPX page that uses the MasterPage change the
0
8189
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8694
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.