Closed Thread Icon

Topic awaiting preservation: ASP get method (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12897" title="Pages that link to Topic awaiting preservation: ASP get method (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: ASP get method <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 09-17-2003 04:12

Hi, guys. How are you?
May I ask something, please?
Well, what I am trying to do is:
1.user enter text into text box
2.show that text on the same page not on new window.

What I code is:

Made 2 asp files following:
1.

code:
<html>
<body>
<form action="demo_reqquery.asp" method="get">
Your name: <input type="text" name="fname" size="20">
<input type="submit" value="Submit">
</form>
</body>
</html>



2.demo_reqquery.asp

code:
<%
dim fname
fname=Request.QueryString("fname")
If fname<>"" Then
Response.Write("Hello " &fname& "!<br />")
Response.Write("How are you today?")
End If
%>



In my way, I can get output on the new window.
Would anybody tell me how to show the text on the same page, please.
Looking forward to hearing from you.
Cya.



Hiroki Kozai

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 09-17-2003 04:18

Oh, I just found out.
Just put them together like:

code:
<html>
<body>
<form action="demo_reqquery2.asp" method="get">
Your name: <input type="text" name="fname" size="20">
<input type="submit" value="Submit">
</form>
<%
dim fname
fname=Request.QueryString("fname")
If fname<>"" Then
Response.Write("Hello " & fname & "!<br />")
Response.Write("How are you today?")
End If
%>
</body>
</html>



Thanks for your time.

Ps. Well, I got ASP available. So now doing asp.....

Hiroki Kozai

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 09-17-2003 04:28

By the way, would anybody explain the difference between method *post* and *get*???
I did some examples of them. But do the same job for my example.
Is there any particular situation where I have to pick up one of them????
Thanks.

Hiroki Kozai

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 09-17-2003 04:43

Well, the difference is:
Get method has limits on the amount of information to send.
But Post method has no limits.
Thanks for your time.


Hiroki Kozai

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-17-2003 05:15

The practical differences:

GET: sends the data via the URL itself. For instance, a form submitted via GET will bring you to http://www.mysite.com/cgi-bin/submit.cgi?name=value&name2=value
POST: sends the data in a somewhat more complicated way, as the "body" of the request, hidden (though not securely) from the user.

The details:

GET is intended to be used as a method for "getting" something from the server. If someone is, say, performing a query on a database, GET should be used because they're trying to retrieve something from the server.

POST, however, is intended to be uses as a method for *sending* something to the server. If the user fills out a (usually fairly long) form with their name, email address, maybe a comment, and perhaps a file upload, it should be sent with POST because the intent of the form is to post information to the server.

As a rule of thumb, if anything on the server will be changed by the form submission, use POST. If not, use GET.

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 09-17-2003 05:37

Thanks, Slime.
How are you today?
It is nearly end of the term.
I am going back to Japan in December.
Miss here a lot.

Hiroki Kozai

« BackwardsOnwards »

Show Forum Drop Down Menu