|
|
<%
function ckmail
indirizzoemail=request.form("email")
if indirizzoemail<>"" then
n=instrrev(indirizzoemail,"@")
m=instrrev(indirizzoemail,".")
if (n>0) and (m>0) and (m>n+1) then
ckmail=true
exit function
end if
end if
ckmail=false
end function
daform=request("fromform")
if daform then
nome=request("nome")
cognome=request("cognome")
residenza=request("residenza")
if ckmail then
email=request("email")
else
daform=""
response.redirect("newsletter.asp?error=1")
end if
if StartConnection () then
sql="INSERT INTO ProfiliNewsLetter (nome, cognome, email, residenza) VALUES ('" &nome&"', '"&cognome&"', '"&email&"', '"&residenza&"')"
'response.write sql
Set rs=Server.CreateObject("ADODB.Recordset")
rs.Open sql, MyConn, 3, 3
'if not rs.EOF then
' rs.movelast
'end if
StopConnection
else
Response.Write("
")
end if
response.redirect("conferma.asp")
else
error=request("error")
if error=1 then
%>
<%
end if
%>
I campi contrassegnati
con * sono obbligatori
<%
end if 'non da form
%>
|
|
|
|