首页
印 像 新 闻 系 统
网站首页 公告信息 编程实例 PHP函数 摄影无界 全景展示 我的作品 意见专栏
 

简单的会员登陆代码

【2006年01月09日 21:43:44】 【阅读:次】 【字体:大 中 小 默认】 【背景:#换背景 #换背景 #换背景 #换背景 #换背景 #换背景 #换背景 默认】
<%
dim name,rs,ps
name=request("uname")
ps=request("pass")
set rs=server.CreateObject("adodb.recordset")
if name<>"" or ps<>"" then
   rs.Open "select pass,name from user where uname="&name&"",conn,2
   if not rs.EOF then
      if not rs("pass")=ps then%>
     
         alert("密码错误");window.location.href("index.asp");
        
      <%else
         Response.Redirect "index.asp"
      end if
   else
      response.write "<script language=JavaScript>" & chr(13) & "alert(你不是本站用户,请先注册!);" & "window.location.href(reg.asp);" & ""
   end if
else%>

alert("你什么也没有填写,请返回重写");window.location.href("index.asp");

<%end if%>

(『印像空间』 【本文来源:『学习笔记』】 【作者:未知】 【录入:留印】)
限200字,剩余 字
关 键 字:
    
搜索条件: