一个简单的聊天试的源代码!(二)

80酷酷网    80kuku.com

  源代码recieve.asp

<html>
<% KNAME=REQUEST.FORM("USNAME")
   KPASSWORD=REQUEST.FORM("USPASSWORD")
DbPath = SERVER.MapPath("chat.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath
SET RS=CONN.EXeCUTE("SELECT name,password FROM chat") ' WHERE NAME="&KNAME)
IF RS.EOF THEN
CONN.EXECUTE("INSERT INTO chat (NAME,PASSWORD) VALUES("&KNAME&","&KPASSWORD&")")
ELSE IF  RS.FIELDS("PASSWORD")<>KPASSWORD THEN
response.write"wrong password"
END IF
END IF
%>
<FRAMESET ROWS="70%,30%" >
<FRAME SRC="forum.asp" NAME="main"
MARGINWIDTH="1" MARGINHEIGHT="1" Noresize >
<FRAME SRC="frft.asp?kname=
" NAME="footnotes" MARGINWIDTH="1"
MARGINHEIGHT="1" Noresize >
</FRAMESET >
</html>

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: