PDA

View Full Version : Newsletter Unsubscribe



Firstfactor
09-10-2006, 09:49 PM
Hi, I have set up a newsletter and what to add add a Unsubscribe link. can anybody suggest the best process to ideally automate Unsubscribe. I'm using ASP.

Stom
10-04-2006, 12:25 AM
have a form with a single field: email address.

pass this form to an asp script, say unsubscribe.asp

in that file have the code somethign liek thus:

<%
---insert your connect to db code here--

rs.filter = "email = '" & request.form("email") & "'"
if rs.RecordCount > 0 Then
rs.Delete
response.write("successfully unsubscribed")
else
response.write("email address not found")
end if
rs.filter = adFilterNone
%>


does that help?