L
lxwizard
Unregistered / Unconfirmed
GUEST, unregistred user!
I am a beginner of Delphi5.0, Now I am learning to write a ISAPI program, here is a problem about "POST" and "GET" method
I created a Web Server Application base on ISAPI, here is the code:
procedure TWebModule1.WebModuleWebActionItem1Action(Sender:TObject; Request:TWebRequest;
Response:TWebResponse;Var Handled:Boolean);
Var
Input:TString;
areaname:String;
Begin
Input:=Nil;
Case request.methodtype of
mtpost: Input:=request.ContentFields;
mtget,mtput,mthead: Input:=request.QueryFields;
end;
areaname:=Input.Values['area']
......
......
End.
Now, the problem is:
I use "GET" method in Html I can get the value of 'area', if I use "POST" method in Html I can get Nothing, why? Please help me
here is the Html code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF">
<form method=get action="/scripts/webquery.dll">
input: <INPUT NAME="Area" VALUE="" SIZE=60>
<p>
<input type="submit" value="Submit">
<input type="Reset" name="Submit" value="reset">
</p>
</form>
</body>
</html>
OS: Win98, omnihttp web server
I created a Web Server Application base on ISAPI, here is the code:
procedure TWebModule1.WebModuleWebActionItem1Action(Sender:TObject; Request:TWebRequest;
Response:TWebResponse;Var Handled:Boolean);
Var
Input:TString;
areaname:String;
Begin
Input:=Nil;
Case request.methodtype of
mtpost: Input:=request.ContentFields;
mtget,mtput,mthead: Input:=request.QueryFields;
end;
areaname:=Input.Values['area']
......
......
End.
Now, the problem is:
I use "GET" method in Html I can get the value of 'area', if I use "POST" method in Html I can get Nothing, why? Please help me
here is the Html code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF">
<form method=get action="/scripts/webquery.dll">
input: <INPUT NAME="Area" VALUE="" SIZE=60>
<p>
<input type="submit" value="Submit">
<input type="Reset" name="Submit" value="reset">
</p>
</form>
</body>
</html>
OS: Win98, omnihttp web server