<!--#include file="conn.asp" -->
<%
username=request.form("name")
password=request.Form("pwd")
if username="" then
response.redirect "index.asp"
end if
if password="" then
response.redirect "index.asp"
end if
dim sql,rs,password1
sql="select pwd from yonghu where username='"&name&"'"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
password1=rs("pwd")
if password1=password then
session("adminok")=ok
response.redirect "admin.asp"
else
response.redirect "user.asp"
end if
rs.close作者: 老肥 时间: 2009-12-28 06:05
对不起,我走错地方了,呵呵