%@ LANGUAGE = "VBScript" %> <% dsn = Application("contact_ConnectionString") fname = Request.Form("FirstName") lname = Request.Form("LastName") title = Request.Form("Title") company = Request.Form("Company") address = Request.Form("Address") city = Request.Form("City") state = Request.Form("State") country = Request.Form("Country") zip = Request.Form("Zip") email = Request.Form("Email") phone = Request.Form("Phone") tstamp = Request.Form("Timestamp") If Request.Form("Optin") = "True" then optin = -1 Else optin=0 If Request.Form("Urgent") = "Yes" then urgent = -1 Else urgent=0 comments = Request.Form("Comments") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open dsn SQLStmt = "INSERT INTO Contacts " SQLStmt = SQLStmt & "(FirstName, LastName, Title, Company, Address, City, State, Country, Zip, Email, Phone, [Timestamp], Comments, Optin, Urgent) " SQLStmt = SQLStmt & "VALUES ('" & fname & "', '" & lname & "', '" & title & "', '" & company & "', '" & address & "', " SQLStmt = SQLStmt & "'" & city & "', '" & state & "', '" & country & "', '" & zip & "', '" & email & "', '" & phone & "', '" & tstamp & "', '" & comments & "', " & optin & ", " & urgent & ");" Set RS = Connection.Execute(SQLStmt) %>
|
| ||||||