ho un problema con uno script semplicissimo di una newsletter..
praticamente si tratta della conferma di registrazione..
m'iscrivo, mi arriva la mail clicco sul link della mail e mi manda alla pagina di conferma..
qui dovrebbe scrivere "Registrazione effettuata" e invece mi dice sempre che devo prima registrarmi! sto diventando scemo perché lo script mi sembra corretto e non capisco perché continui a fare così. Se qualcuno riuscisse a darmi una mano, questo è il sorgente:
<%@ 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 in 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 = "L'iscrizione è stata confermata." & Email
else
output = "Bisogna prima registrarsi."
end if
end if
%>

Rispondi quotando