08. juli 2001 - 00:48Der er
12 kommentarer og 1 løsning
Email list sign up form !
Hi everyone I sure hope some can help me with this problem....
I got a email list database, called subs.mdb and in there I got a table called \"emails\". I want someone out there to help me make a form like the one on , Ontheminute.com where people can sign up and unsubscribe. But they dont change web sites when they for example write in a email allready subscribing to the list, they just get for example a little message under it , like \"You allready subscribe to the newsletter\"...
is that possible to dp ? can you make it ? do you know of scripts that can do that allready ?
thats the newsletter I use but I have experienced some problems with the mailing list.. For example thoose new windows that Ontheminute.com also get.. or they change site... do you understand ?
set rs = server.createobject(\"ADODB.Connection\") subscribe = request.form(\"subs\") unsubs = request.form(\"unsubs\") if send <> \"\" Then email = request.form(\"email\") sql = \"Select * from emails where email LIKE \'\"&email&\"\'\" rs.open sql,str if rs.EOF then sql2 = \"Insert into emails(email) Values(\'\"&email&\"\')\" set rs = rs.execute(sql2) Alert = \"You are now subscribed to the newsletter\" rs.close else Alert = \"You are already subscribed to the newsletter\" end if
Elseif unsubs <> \"\" Then email = request.form(\"email\") sql = \"Select * from Emails where email LIKE \'\"&email&\"\'\" rs.open sql,str if rs.eof then Alert = \"You are not subscribed to the newsletter\" else sql2 = \"DELETE from emails where email = \'\"&email&\"\'\" set rs = rs.execute(sql2) Alert = \"You have been unsubscribed\" end if End if <html> <head> <title>Newsletter</title> </head> <body> <center> <b><%=Alert%></b> <form method=\"post\" action=\"news.asp\"> <b>Your email:<br></b> <input type=\"text\" name=\"email\"><br><br> <input type=\"submit\" name=\"subs\" value=\"subscribe\"> <input type=\"submit\" name=\"unsubs\" value=\"unsubscribe\"> </form> </body> </html>
set rs = server.createobject(\"ADODB.Connection\") subscribe = request.form(\"subs\") unsubs = request.form(\"unsubs\") if send <> \"\" Then email = request.form(\"email\") sql = \"Select * from emails where email LIKE \'\"&email&\"\'\" rs.open sql,str if rs.EOF then sql2 = \"Insert into emails(email) Values(\'\"&email&\"\')\" set rs = rs.execute(sql2) Alert = \"You are now subscribed to the newsletter\" rs.close else Alert = \"You are already subscribed to the newsletter\" end if
Elseif unsubs <> \"\" Then email = request.form(\"email\") sql = \"Select * from Emails where email LIKE \'\"&email&\"\'\" rs.open sql,str if rs.eof then Alert = \"You are not subscribed to the newsletter\" else sql2 = \"DELETE from emails where email = \'\"&email&\"\'\" set rs = rs.execute(sql2) Alert = \"You have been unsubscribed\" end if End if %>
set rs = server.createobject(\"ADODB.Connection\") subscribe = request.form(\"subs\") unsubs = request.form(\"unsubs\") if send <> \"\" Then email = request.form(\"email\") sql = \"Select * from emails where email LIKE \'\"&email&\"\'\" rs.open sql,str if rs.EOF then sql2 = \"Insert into emails(email) Values(\'\"&email&\"\')\" set rs = rs.execute(sql2) Alert = \"You are now subscribed to the newsletter\" rs.close else Alert = \"You are already subscribed to the newsletter\" end if
Elseif unsubs <> \"\" Then email = request.form(\"email\") sql = \"Select * from Emails where email LIKE \'\"&email&\"\'\" rs.open sql,str if rs.eof then Alert = \"You are not subscribed to the newsletter\" else sql2 = \"DELETE from emails where email = \'\"&email&\"\'\" set rs = rs.execute(sql2) Alert = \"You have been unsubscribed\" end if End if %>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.