F
foxnt
Unregistered / Unconfirmed
GUEST, unregistred user!
我初写的CGI程序如下:
procedure TWebModule1.WebModule1WebLoginAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
Log_name ,Log_pw : string;
begin
Log_name := Request.ContentFields.Values['name'];
Log_pw := Request.ContentFields.Values['password'];
Query_login.sql.Clear;
Query_login.sql.add('select * from password ');
// Query_login.ParamByName('name').asstring := Log_name;
// Query_login.ParamByName('pwd').asstring := Log_pw;
Query_login.open;
if Query_login.RecordCount <> 0 then
Response.Content := ' USRNAME OR PASSWORD OR'
// Response.SendRedirect('http://100.100.100.31')
else
Response.Content := ' USRNAME OR PASSWORD ERROR';
end;
一运行,IE显示:正在打开。。。就没反应了。不知为何。
该HTML语法如下:
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>input your name</title>
</head>
<body bgcolor="#000000" text="#FFFF00">
<form action="cgi-bin/cgiweb.exe"
method="get"
<p align="center"> </p>
<p align="center"> </p>
<p align="center">请您登录</p>
<p align="center"> </p>
<p align="center">输入你的名称 <input type="
text" name="name" size="20"></p>
<p align="center">输入你的密码 <input type="
password" name="password" size="20"></p>
<p align="center"><input type="submit" value="提交" name="B1">
;
<input type="reset" value="全部重写" name="B2"></p>
</form>
</body>
</html>
请高手指点,谢谢!
WEB server and cgi-bin是正确的。