Here is the code to do a database insert, of course you need to create a database first if you havent got one already...
- Code: Select all
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("data.mdb") & ";"
strName = Request.Form("Name")
strQuery = "INSERT INTO tblPeople ([Name]) VALUES ('"&strName&"')"
Set objRS = objConn.Execute(strQuery)
Set objRS = Nothing
objConn.Close
Set objConn = Nothing