Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 06:45 PM
Lovely Angel For You
Guest
 
Posts: n/a
Default 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>
  #2  
Old July 20th, 2005, 06:45 PM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: Forms Using EncType = Multipart - Text Is Not Passed !

lovely_angel_for_you@yahoo.com (Lovely Angel For You) wrote:
[color=blue]
> Is it that I cant get text data when I use
> EncType="multipart/form-data".[/color]

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

  #3  
Old July 20th, 2005, 06:46 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: Forms Using EncType = Multipart - Text Is Not Passed !

lovely_angel_for_you@yahoo.com (Lovely Angel For You) wrote:
[color=blue]
>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.
>[/color]

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.
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles