you will obviously have a form for the contact details and then a file that picks up the entered data on submit.
<%
name=request.form("name")
email=request.form("email")
comment=request.form("comment")
%>
then it needs to be entered into the database table. to use a mysql or sql database just use their connection strings instead. database is called textdatabase and table is called contacts
<%
datapath=Server.Mappath("testdatabase.mdb")
strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & datapath & ";"
Set CONN = Server.CreateObject("ADODB.Connection")
CONN.Open strconn
myquery = "INSERT INTO contacts (name,email,comments) VALUES ('" & name & "','" & email & "','" & comments & "')"
conn.execute(myquery)
set conn = nothing
%>
'then redirect to the thank you page
response.redirect "thankyou.html"
the above is fairly basic, i normally add in form validation to check for invalid fields eg empty fields, none numeric or email validation etc