< %
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
iGuestID = Request.Form("txtID")
sGuestEmail = Request.Form("txtEmail")
if iGuestID < > "" and sGuestEmail < > "" then
'在数据库中更新用户纪录
strSQL_UnSubs = "UPDATE Guests SET Guests.Mail_List=" & 0 & _
" WHERE Guests.Guest_ID=" & iGuestID & _
" AND Guests.Guest_Email='" & sGuestEmail & "';"
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open strDSNPath
oConn.Execute strSQL_UnSubs, iUpdates
on error resume next
oConn.Close
Set oConn = Nothing
if err.number < > 0 then
sError = ...SQL语句履行掉败提醒信息, 略...
else
if iUpdates < > 0 then
sError = ...作废定阅胜利提醒信息,略...
else
sError = ...不克不及找到数据库纪录提醒信息,略...
end if 'iUpdates < > 0
end if 'err.number < > 0
else
Response.Redirect("homepage.htm")
end if 'iGuestID < > ""
end if 'REQUEST_METHOD = "POST"
%>