What is the difference between REQUEST and REQUEST.QUERYSTRING?

M

michaaal

What is the difference between these two statements? They seem to do the
same thing...

response.write(request("variable"))

response.write(request.querystring("variable"))
 
R

Ray at

Try this:

<form method="post" action="somepage.asp?x=6">
<input name="x" type="text" value="0">
<input type="submit">
</form>

On somepage.asp put:

response.write request("x")

What do you get? 6 or 9?


The request collection contains the querystring and form collections.
Always specify what you mean, either request.form or request.querystring.
Don't use just request by itself. It'll come back to bite you - especially
when you go to .net. :] Always qualify everything.

Ray at home
 
M

michaaal

Perfect answer, Ray. Extremely informative and also very practical. Thank
you!

Ray at said:
Try this:

<form method="post" action="somepage.asp?x=6">
<input name="x" type="text" value="0">
<input type="submit">
</form>

On somepage.asp put:

response.write request("x")

What do you get? 6 or 9?


The request collection contains the querystring and form collections.
Always specify what you mean, either request.form or request.querystring.
Don't use just request by itself. It'll come back to bite you - especially
when you go to .net. :] Always qualify everything.

Ray at home


michaaal said:
What is the difference between these two statements? They seem to do the
same thing...

response.write(request("variable"))

response.write(request.querystring("variable"))
 
E

Evertjan.

<form method="post" action="somepage.asp?x=6">
<input name="x" type="text" value="0">
<input type="submit">
</form>

On somepage.asp put:

response.write request("x")

What do you get? 6 or 9?

Real magic, I always seem to get 9 !

Where does this 9 come from? is it 6*1.5 ?

;--}
 
E

Evertjan.

Ray at said:
No, you see, if you don't specify, it takes the querystring value and
returns it inverted. So, if you had a querystring of L, you'd get 7 as a
result, and if your querystring is a W, you'd get an M, and so on.

That is why my regionalisation to Hieroglyphic LCID=96669 did invert
Horeb's eye "H" in the query stylus, while displaying the pictogram "N" for
water correctly.
 

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

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top