<head> <meta http-equiv="Content-Language" content="zh-cn"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>登陆</title> </head>
<body background="bg.jpg">
<p align="center"> </p> <p align="center"> </p> <p align="center"> </p> <p align="center"><font face="黑体" size="6"><b>用户登陆</b></font></p> <p align="center"> </p> <form method="POST" name="form1" action="yz.asp"> <p> 用户名:<input type="text" name="name" size="20" style="border-style: solid; border-width: 1px"></p> <p> 密 码:<input type="password" name="password" size="21" style="border-style: solid; border-width: 1px"></p> <p> <input type="submit" value="提 交" name="submit" style="border-style: solid; border-width: 1px"></p> </form> <p> </p>
</body>
</html> 验证模块 <!--#include file="conn.asp"--> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>验证模块</title> <style type="text/css"> <!-- body { background-image: url(bg.jpg); } --> </style></head> <body> <div align=center>
<% dim strname dim strpassword dim rs dim sql
strname=request.form("name") strpassword=request.form("password") set rs=server.createobject("adodb.recordset") exec="select name from userinfo where name='"&strname&"' and password='"&strpassword&"' " rs.open exec,conn,1,1 if not rs.eof then Response.Redirect "main.htm" else response.write"<a href='index.asp'>登陆失败,单击重新登陆" end if set rs=nothing conn.close set conn=nothing %> </body>
</html>
[此贴子已经被作者于2005-5-25 3:16:17编辑过]