QQ登录界面代码

2022-05-19 18:49:25   文档大全网     [ 字体: ] [ 阅读: ]

#文档大全网# 导语】以下是®文档大全网的小编为您整理的《QQ登录界面代码》,欢迎阅读!
界面,登录,代码
QQ登录界面代码

login.asp:

用户名: :

maxlength="16">

src="images/login.gif" type="image" WIDTH="37" HEIGHT="20">

coon.asp: <%

connstr = "DBQ=" + server.mappathuser.mdb") + ";DRIVER={Microsoft Access Driver (*.mdb)}"

Set conn=Server.createobject("ADODB.CONNECTION") conn.Open connstr %>

外加after_login.asp登录验证页面:

<%

Dim UserName,PassWord

UserName=replace(trim(Request.Form("Username")),"'","‘") PassWord=replace(trim(Request.Form("PassWord")),"'","‘")

If UserName="" or PassWord="" Then

Response.Write ("")

Response.end End If

if Instr(UserName,">")>0 or Instr(UserName,"<")>0 or Instr(UserName,"=")>0 or Instr(UserName,"%")>0 or

Instr(UserName,chr(32))>0 or Instr(UserName,"?")>0 or Instr(UserName,"&")>0 or Instr(UserName,";")>0 or Instr(UserName,",")>0 or Instr(UserName,"'")>0 or


Instr(UserName,chr(34))>0 or Instr(UserName,chr(9))>0 or Instr(UserName,"")>0 or Instr(UserName,"$")>0 then Response.Write ("")

Response.end else

UserName=Trim(UserName) end if

set rs=server.createobject("adodb.recordset")

sql="select * from [user] where UserName='"&UserName&"'" rs.open sql,conn,1,3 if rs.eof then

Response.Write ("") Response.end else

if rs("PassWord")<>PassWord then rs.close

set rs=nothing

Response.Write ("") Response.end else

session("UserName")=UserName'登录成功传递一个session值以便以后调用用户相关

session.timeout=300 end if end if rs.close

set rs=nothing CloseDatabase %>


本文来源:https://www.wddqxz.cn/20c52f8583d049649b6658d0.html

相关推荐