Mi riferisco sempre allo script "mynewsletter" scaricato da html.it da script asp.
Il link nella mail arriva così:
://dominio.net/newsletter/newsletterConfirmation.asp?email=webmaster@dom...
(l'http davanti c'è ora l'ho tralasciato)
è corretto o è un errore?
Poi ho il problema che cliccando sul questo link di conferma che arriva nella mail, mi apre una nuova finestra con la home del sito e nell'url visualizza questo:
http://www.dominio.net/?email=webmaster@dominio.net
e nel database il valore del campo status non cambia da 0 a 1, e quindi l'utente rimane non confermato.
il codice di newsletterConfirmation.asp è:
originariamente lo script è per cdonts, ma sono riuscito a cambiarlo in cdosys. Non so se il problema possa dipendere da questo.codice:<%@ 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 %> <html> <head> <title><%=CompanyName%> - Newsletter Confirmation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="styles.css" type="text/css"> </head> <body bgcolor="#FFFFFF" text="#000000"> <table width="60%" border="1" cellspacing="1" cellpadding="1" align="center" bordercolor="#000033"> <tr> <td> Newsletter Confirmation</p> <%=output%></p> </td> </tr> <tr> <td> <div align="center"><span class="tiny">myNewsletter version <%=ScriptVersion%> ASP Burst (http://www.aspburst.com)</span> </div></td> </tr> </table> </body> </html>
Qualcuno mi aiuta?

Rispondi quotando
