我的妈啊!你早说就得了,不就是验证用户身份了????成功就进入用户页,不成功就返回登陆页?是吧?!!! 代码如下: <% user=request.form("user") pwe=request.Form("pwd") set rss=server.CreateObject("adodb.recordset") rss.source="select id from user where user='"& user &"' and pwd='"& pwd &"'"//从数据库查找是否有该用户 rss.open rss.source,conn,1,1 if not rss.eof then rss.close set rss=nothing else rss.close set rss=nothing %> <script language="javascript"> alert("用户名或密码错误!"); document.location="index.asp";//如果密码或用户名错误就返回主页 </script> <% end if %>
----------------------------------------------
只爱ASP,JSP,DELPHI,.NET(ASP.NET-C#),JAVA..SQL-SERVER,MS-ACCESS...共同进步!!