《全国大学英语四六级报名涂卡手册.doc》由会员分享,可在线阅读,更多相关《全国大学英语四六级报名涂卡手册.doc(29页珍藏版)》请在金锄头文库上搜索。
1、会员注册登录欢迎页面的实现实训指导目录一、 准备工作1. 创建文件夹,收集素材,合理放置2. 开启数据库文件所在文件夹的写权限3. 配置IIS4. 打开DW配置站点二、 在index.asp页面中嵌入会员管理模块(也可以是想包含该模块功能的其它网页)该网页的设计视图如下图所示:重点看左边部分,左边部分的核心代码是: 三、制作网页hyzcjl.asp该网页的设计视图是:代码视图是: 【会员注册】 帐号: 密码: 四、制作login_ok.asp文件其代码视图如下:会员登录 提示信息 % dim userid,passwd userid=trim(request(userid)use
2、rid=replace(userid,)passwd=trim(request(passwd)passwd=replace(passwd,) if userid= or passwd= then errmsg=errmsg+用户名和用户密码不能为空! founderr=truecall wrong1() end ifif userid then sql1=select * from member where username=&userid& rs.open sql1,conn,3,3 if rs.eof then errmsg=errmsg+你输入的用户不存在! founderr=truec
3、all wrong2() elseif passwd=rs(password) then session(user_name)=rs(username) rs(lasttime)=now() rs(logins)=rs(logins)+1 rs.updatecall loginok() else errmsg=errmsg+你输入的密码错误! founderr=truecall wrong2() end ifend ifsub wrong1()response.Write( 会员登录错误!) response.Write(errmsg) response.Write(请重新登陆 ) end s
4、ub sub wrong2()response.Write( 会员登录错误!) response.Write(errmsg) response.Write(请重新登陆) rs.close set conn=nothing end sub sub loginok()response.Write( 会员登录成功!) response.Write(&userid&,欢迎您的光临!) response.Write(修改我的资料) response.Write(订单查询) response.Write(返回首页 ) rs.close set conn=nothing end sub% 五、制作conn.asp文件六、创建文件夹及文件bookdbase/bookshop.mdbbookshop.mdb文件中至少包含member表,该表至少要包含username字段、passwd字段、lasttime字段和logins字段七、上述文件链接中用的文件modify.asp和dingdan.asp 文件的制作过程不在本实训范围内,其内容可以是空。八、制作文件reg.htm该文件的设计视图如下图所示该文件的代码视图是:新会员注册style type=te