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

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="multipart/form-data".

Please help in solving this problem.

Love
Lovely

_________________________________________________

<tr>
<td width="100%" valign="top">
<form method="POST" action="data_save.asp"
EncType="multipart/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%">&nbsp;</td>
<td width="80%"></td>
</tr>
<tr>
<td width="20%">Name</td>
<td width="80%"><input type="text" name="name"
size="43"></td>
</tr>
<tr>
<td width="20%">Image</td>
<td width="80%"><input type="text"
name="image"></td>
</tr>
<tr>
<td width="20%">Description</td>
<td width="80%"><textarea rows="2"
name="description" 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 4523
lo******************@yahoo.com (Lovely Angel For You) wrote:
Is it that I cant get text data when I use
EncType="multipart/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
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...
3
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...
1
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
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:...
2
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
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...
21
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...
2
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.