set CN=server.CreateObject("ADODB.Connection")
CN.Open "dsn=" & application("dbodbcdsn"),application("dbusername"),application("dbpassword")
set CM=server.CreateObject("ADODB.Command")
CM.ActiveConnection=CN
CM.CommandType=adCmdText
SQL="insert into emails values("
SQL=SQL & "'',"
SQL=SQL & "'" & Request.Form("first_name") & "',"
SQL=SQL & "'" & replace(Request.Form("last_name"),"'","´") & "',"
SQL=SQL & "'" & Request.Form("email_address") & "',"
SQL=SQL & "'" & "(" & Request.Form("areacode") & ") " & Request.Form("prefix") & "-" & Request.Form("phone") & "',"
SQL=SQL & "'" & Request.Form("request") & "',"
SQL=SQL & "'" & replace(Request.Form("comments"),"'","´") & "',"
SQL=SQL & "'" & SQLPrepare(now) & "');"
CM.CommandText=SQL
CM.Execute
|