%@ Language = VBScript %> <% Email = request.queryString("email") 'Redirect if the user doesn't belong here if len(Email) = 0 then response.redirect("http://"&DomainName) else 'Open database set con = server.createObject("ADODB.Connection") con.open(strServerConnection) 'Check whether their email is the database sqlString = "Select Email from Newsletter" set rs = con.execute(sqlString) while not rs.eof if trim(rs("Email")) = Email then blnFound = true end if rs.moveNext wend if blnFound then 'Set Status value to 1 (true) sqlString = "Update Newsletter Set Status = 1 Where Email = '"&Email&"'" con.execute(sqlString) output = "Your subscription is confirmed! ("&Email&")" else output = "Please subscribe first." end if end if %>
|
Newsletter Confirmation <%=output%> |
|
myNewsletter version <%=ScriptVersion%> ASP Burst (http://www.aspburst.com) |