Qualcuno mi spiega perchè quando utilizzo questo script mi arrivano due email: una vuota ed una regolarmente compilata? :master:
Set rs = Server.CreateObject("ADODB.Recordset")
codice:<% strSQL="SELECT * FROM Addlink WHERE Sito = '" & Sito & "';" rs.Open strSQL,cn if not rs.eof then set rs = nothing set cn = nothing ERRORE = "Url già inserita." exit sub end if rs.close strSQL = "INSERT INTO Addlink (Sito, Titolo, Email) VALUES ('" strSQL = strSQL & Sito & "','" & Titolo & "','" & Email & "')" cn.Execute(strSQL) set cn = nothing set rs = nothing response.redirect("default.asp") end sub Titolo=request.form("Titolo") Sito=request.form("Sito") Email=request.form("Email") Dim objMail, messaggio messaggio = messaggio & VBcrlf & "Ciao " messaggio = messaggio & VBcrlf & "Titolo = " & Titolo & " " messaggio = messaggio & VBcrlf & "Sito = " & Sito & " " messaggio = messaggio & VBcrlf & "E-mail = " & Email & " " Set objMail = Server.CreateObject("CDONTS.NewMail") objMail.From = "miaemail@ana.com" objMail.To = email objMail.Subject = "Ciao" objMail.Body = messaggio objMail.importance = 2 objMail.MailFormat = 0 objMail.BodyFormat = 0 objMail.Send Set objMail = Nothing if request.form("type") = "I" then call insertLink() %>

Rispondi quotando