正在加载图片...
電子工業出版社 JEUISHING HOUSE DF ELECTRONCS INDSTR Dim strsqlselectUsers Dim password userName=Request Form(txtUserName") Set rsUsers = Server. CreateOb ject("ADODB. Recordset") strSqlselectUsers="SELECT FROM guestbook users WHERE username=+user Name+ sUsers. Open strSqlselectUsers, connDemo, 1, 3 判断用户是否存在 判断密码是否正确 If password>trim(rsUsers("password"))Then Response, Write("密码错误") Response, end 判断是否输入了密码,如输入了密码,则新建立一个用户帐号 If password<> Then 接受表单输入数据,写入数据库表 rsUsers("password")=password rsUsers. Close set rsUsers=Nothing End if End if 建立记录集,新建发言 D Dim strSqlselectMessages Set rsMessages Server CreateObject("ADODB. Recordset") strSqlSelectMessages="SELECT FROM guestbook messages rsMessages. Open strSqISelectMessages, connDemo, 1, 3 接受表单输入数据,写入数据库表 rsMessages AddNewDim rsUsers Dim strSqlSelectUsers Dim userName Dim password userName=Request.Form("txtUserName") password=Request.Form("pwdPassword") Set rsUsers = Server.CreateObject("ADODB.Recordset") strSqlSelectUsers="SELECT * FROM guestbook_users WHERE username='"+userName+"'" rsUsers.Open strSqlSelectUsers, connDemo,1,3 '判断用户是否存在 If Not rsUsers.Eof Then '判断密码是否正确 If password<>trim(rsUsers("password")) Then Response.Write("密码错误") Response.end End If Else '判断是否输入了密码,如输入了密码,则新建立一个用户帐号 If password<>"" Then '接受表单输入数据,写入数据库表 rsUsers.AddNew rsUsers("username")=userName rsUsers("password")=password rsUsers.Update rsUsers.Close set rsUsers=Nothing End if End if '建立记录集,新建发言 Dim rsMessages Dim strSqlSelectMessages Set rsMessages = Server.CreateObject("ADODB.Recordset") strSqlSelectMessages="SELECT * FROM guestbook_messages" rsMessages.Open strSqlSelectMessages, connDemo,1,3 '接受表单输入数据,写入数据库表 rsMessages.AddNew
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有