%
sTitlePage="Newsletter"
%>
<%
'Response.Write "Inserisci il titolo della pagina
"
If sPseudo <> "" Then Response.Write "Ciao" & Server.HTMLEncode(sPseudo)
'Response.Write "Stai visualizzando la nuova pagina" & sURLPage & "
"
'Response.Write "Sei sul sito" & GLOBAL_SITE_NAME & "
"
CreateTopTable "Lamiatabella","Newsletter"
Response.Write "
"
%>
<%
Dim con, rs, strSql
If Request.Form("cmdSubmit") <> "" Then
'The user has submitted the page, so process the Newsletter subscription request
'Connect to the database
Set con = GetDBConnection()
'Verify that the email address does not already exist in the database
strSql = "SELECT Email FROM Subscribers WHERE Email = '" + Request.Form("txtEmail") + "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSql, con, 1, 2
If rs.EOF Then
'The email address does not already exist, so add it
rs.AddNew()
rs("Email") = Request.Form("txtEmail")
rs.Update()
'The email address has been added, show confirmation.
'MODIFY the text below is displayed when an email is added to the newsletter
%>
Il tuo indirizzo è stato registrato con successo.
<%
Else
'The email address already exists in the database
'MODIFY the text below is displayed when a person tries to enter the same email address
' a second time.
%>
Sei già stato registrato alla newsletter, grazie per il tuo interessamento.
<%
End If
'Clean up database objects
rs.Close()
Set rs = Nothing
con.Close()
Set con = Nothing
Else
'MODIFY the text below is displayed when the page is first loaded.
%>
<%
End If
%>
<%
CreateBottomTable ""
%>