Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

post method problems

Status
Not open for further replies.

naserg

Programmer
Mar 28, 2002
18
CA
I have problems with method POST when I use IIS 5.1 + IE 6.x.
When I use method GET that's OK.

For example:
Page HTML:
<form name=&quot;frm&quot; action=&quot;results.asp&quot; method=&quot;post&quot;>
<P>Login: <input type=&quot;text&quot; name=&quot;login&quot; size=&quot;15&quot;
maxlength=&quot;10&quot;value=&quot;&quot;>
<P><input type=&quot;submit&quot; value=&quot;GO&quot;>
</form>

Page results.asp:
<%
Dim login
login = request.form(&quot;login&quot;);
%>
LOGIN = <%=login%>

Result:
1) Method Post:
LOGIN = null Bad
2) Method Get:
LOGIN = mylogin OK

What's the problem with POST method?

Many thanks,
Naser Ghasemlou
 
there should not be any problem with the combination of IIS5 and IE6 in using the POST method.

one question, why are you setting a default value of &quot;&quot; to a input field when it is not a nidden field. this may be getting passed as the value and causing your problems. A language that doesn't affect the way you think about programming is not worth knowing.
admin@onpntwebdesigns.com
 
if your submitting your form by pressing ENTER instead of pressing the SUBMIT button, this will automatically send the data as GET instead of POST (from my past experiences).

This is why I always use the following to get my values... this is both POST and GET friendly:

Page results.asp:
<%
Dim login
login = request(&quot;login&quot;);
%>
LOGIN = <%=login%>



Cheers,

Gorkem.

 
onpnt: I didn't even notice that. I still can't explain how it would ever work as a GET though. :)
 
Hi onpnt

I took out the default value of &quot;&quot; from the input field but by didn't help. By the way, when I try to get the SERVER VARIABLES it always returns REQUEST_METHOD=GET. even when I use POST or HEAD in my form. If you have any other suggestion please let me know.
Submitting the same thread two times was a mistake and I don't know how to get rid of one of them.
Thanks
naserg
 
Hey disord3r

I am sorry that I didn't explain it before, however you are wright and when I use GET method, I get the results by REQUEST.QUERYSTRING. Anyway, my POST method is not working yet.
Any suggestion?
All the best

naserg
 
Hi Gorkem

I tried your suggestion but still have the same problem.
Any other suggestion?

thanks

naserg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top