request.form problem

M

MikeR

I have an html page which submits form data to an asp page. If I use the get
method, the data can be displayed in the receiving page using request.querystring.
I'd like to use the post method so the data isn't on the URL.

<form method="POST" ENCTYPE="multipart/form-data" Action="..\og\cc.asp">
<input type="text" name="T1" size="20"><P>
<input type="submit" value="Submit" name="B1">
</form>

Below is the script on the rreceiver.
Nothing displays when the sender POSTs the form data.
<%
response.write(request.form("b1")) + "<br>"
response.write(request.form("T1"))
'response.write(request.querystring("b1")) + "<br>"
'response.write(request.querystring("T1"))
%>
Thanks,
Mike
 
B

Bob Barrows [MVP]

MikeR said:
I have an html page which submits form data to an asp page. If I use
the get method, the data can be displayed in the receiving page using
request.querystring. I'd like to use the post method so the data
isn't on the URL.
<form method="POST" ENCTYPE="multipart/form-data"

Get rid of the ENCTYPE="..." part - that's only for uploading files
 
T

Tim Slattery

MikeR said:
I have an html page which submits form data to an asp page. If I use the get
method, the data can be displayed in the receiving page using request.querystring.
I'd like to use the post method so the data isn't on the URL.

<form method="POST" ENCTYPE="multipart/form-data" Action="..\og\cc.asp">

"multipart/form-date" is used for uploading files. It causes the
contents of the form, including the contents of uploaded files, to be
packaged into a MIME-formatted stream. Your server-side code must then
be able to unscramble the MIME blob and extract the pieces. If you
have no <input type="file"....> elements, and you want to use the
Request.Form collection, just delete the ENCTYPE parameter in the
<form...> tag.
 
M

MikeR

Tim said:
"multipart/form-date" is used for uploading files. It causes the
contents of the form, including the contents of uploaded files, to be
packaged into a MIME-formatted stream. Your server-side code must then
be able to unscramble the MIME blob and extract the pieces. If you
have no <input type="file"....> elements, and you want to use the
Request.Form collection, just delete the ENCTYPE parameter in the
<form...> tag.
Thanks, Tim.
Sorry for the delay, I've been away for a few days.
Any way do do it on a file upload form? Know where I can find a tutorial on
"unscramble the MIME blob and extract the pieces" ?
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top