新微赢技术网

标题: ASP菜鸟请教,感谢 [打印本页]

作者: ████    时间: 2010-1-7 03:17
标题: ASP菜鸟请教,感谢
登陆 界面代码
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link href="css/css.css" rel="stylesheet" type="text/css">
<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<BR>
<BR>
<BR>
<FORM action=loginadmin.asp name="Form1" id=Form1>
<table width="420" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/loginadmin.gif" width="420" height="91"></td>
</tr>
<tr>
<td height="120" align="center" valign="middle" bgcolor="#ededed">
<TABLE id=Table3 width="95%" align=center border=0>
<TBODY>
<TR>
<TD> <FIELDSET>
<LEGEND accessKey=F align=left>登陆窗口</LEGEND>
<TABLE id=Table4 cellSpacing=2 cellPadding=2 width="100%"
border=0>
<TBODY>
<TR>
<TD width="10%">&nbsp;</TD>
<TD width="20%">用&nbsp;户&nbsp;名:</TD>
<TD><INPUT id=Text1
style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #7a7a7a 1px solid; FONT-SIZE: 10pt; BORDER-LEFT: #7a7a7a 1px solid; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; HEIGHT: 20px; BACKGROUND-COLOR: #efefef"
name=username> </TD>
</TR>
<TR>
<TD width="10%">&nbsp;</TD>
<TD width="20%">密&nbsp;&nbsp;&nbsp;&nbsp;码:</TD>
<TD><INPUT id=Password1
style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #7a7a7a 1px solid; FONT-SIZE: 10pt; BORDER-LEFT: #7a7a7a 1px solid; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; HEIGHT: 20px; BACKGROUND-COLOR: #efefef"
type=password name=password> </TD>
</TR>
<TR>
<TD align=middle colspan="3"> <INPUT class=tbutton id=Submit1 type=submit value=" 登 陆 " name=submit>
</TD>
</TR>
</TBODY>
</TABLE>
</FIELDSET>
</TD>
</TR>
</TBODY>
</TABLE>
</td>
</tr>
</table>
</FORM>
</BODY></HTML>


然后那个loginadmin.asp代码是
<!-- #include file="conn.asp" -->
<%
if Request("username")="" then
%>
<script language=Javascript>
alert("用户名不能为空!");
window.history.go(-1);
</script>
<%
response.End
end if
sql="select * from admin where username='" & trim(request("username")) & "' and password='" & replace(trim(request("password")),"'","''") & "'"
'response.write sql
'response.End
set rs = conn.Execute(sql)
if not (rs.eof or err) then
session("username")=rs("username")
if session("oldUrl")<>"" then
response.redirect session("oldUrl")
else
response.redirect "admin_index.asp"
end if
else
%>
<script language=Javascript>
alert("用户名或密码错误,请重新输入!");
window.history.go(-1);
</script>
<%
end if
%>


为什么登陆不上去哈, 在登陆界面点登陆又回到登陆界面了。.
谢谢各位帮帮忙 在线等 QQ 27278




欢迎光临 新微赢技术网 (http://bbs.weiying.cn/) Powered by Discuz! X3.2