FLASH中:
第一帧:
on (release) {
if (username == "" or username == "请输入姓名" or username == undefined) {
username = "请输入姓名";
} else if (password == "" or password == "请输入密码" or password == undefined) {
password = "";
} else {
loadVariables("user_login_and_registe/login.asp", "", "POST");
gotoAndPlay(2);
}
}
第二十帧:
if (msg == "ok") {
play();
} else {
gotoAndStop(20);
}
login.asp的内容:
<%
userexist=0
username=Request.form("username")
password=Request.Form("password")
set conn = server.createobject("adodb.connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("userinfo.mdb")
set rs = server.createobject("adodb.recordset")
rs.open "userinfotable",conn,1,3
'sql = "select username from userinfotable order by id desc"
'SQL语句,从数据表邮件列表中读出所有数据,并根据ID进行反向排列。
'rs.Open sql,conn,1,3
'rs.AddNew
'打开从库中读出的记录集。
'response.Write "list="
'输出"list="这几个字符
while not rs.eof
'While 循环语句,这里是条件,当记录集没有空时,执行后边的语句。
if username=rs("username") then
if password=rs("password") then
response.write"msg=ok"
else
response.write"msg=fail"
end if
'rs.addnew
'rs("username") = username
'rs("password")=password
'rs.update
'set rs = nothing
'set conn = nothing
userexist=1
end if
rs.MoveNext
wend
%>
第一帧:
on (release) {
if (username == "" or username == "请输入姓名" or username == undefined) {
username = "请输入姓名";
} else if (password == "" or password == "请输入密码" or password == undefined) {
password = "";
} else {
loadVariables("user_login_and_registe/login.asp", "", "POST");
gotoAndPlay(2);
}
}
第二十帧:
if (msg == "ok") {
play();
} else {
gotoAndStop(20);
}
login.asp的内容:
<%
userexist=0
username=Request.form("username")
password=Request.Form("password")
set conn = server.createobject("adodb.connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("userinfo.mdb")
set rs = server.createobject("adodb.recordset")
rs.open "userinfotable",conn,1,3
'sql = "select username from userinfotable order by id desc"
'SQL语句,从数据表邮件列表中读出所有数据,并根据ID进行反向排列。
'rs.Open sql,conn,1,3
'rs.AddNew
'打开从库中读出的记录集。
'response.Write "list="
'输出"list="这几个字符
while not rs.eof
'While 循环语句,这里是条件,当记录集没有空时,执行后边的语句。
if username=rs("username") then
if password=rs("password") then
response.write"msg=ok"
else
response.write"msg=fail"
end if
'rs.addnew
'rs("username") = username
'rs("password")=password
'rs.update
'set rs = nothing
'set conn = nothing
userexist=1
end if
rs.MoveNext
wend
%>
回复Comments
作者:
{commentrecontent}