有源码!数据更新有错!谢谢!(在线)
在本地测试正常。放到网上,有时就会全部更新我数据库里的时间(firsttime)字段.
mymdb id username pass firsttime year(月份)
if rsttitle("firsttime")=#2003-05-01# then
if username="" or pass1="" then
response.write"<center>密码,账号没有填写!<p>"
end if
newconn.begintrans
sq="update member set firsttime='"&date()&"' where user='"&username&"' "
newconn.execute(sq)
if newconn.errors.count=0 then
newconn.CommitTrans
else newconn.rollbacktrans
end if
response.Write"欢迎你第一次登录"
else firsttimes = cdate(rsttitle("firsttime"))
months = cint(rsttitle("year"))
if Date()<=Dateadd("m",months ,firsttimes)then
Session("zzc")=username
session("quyu")=rsttitle("quyu")
response.redirect"转向页面
else if Date()>Dateadd("m",months ,firsttimes) then response.write"请续费"