Script thank you.htm
<%option explicit%>
Terima Kasih
<%
dim objconn, objcomm, objpar, strsql, filepath, reqtanggal, reqnama, reqemail, reqkomentar
reqtanggal = Date
‘—
reqnama = Request.Form(“txtnama”)
reqemail = Request.Form(“txtemail”)
reqkomentar = Request.Form(“txtcoment”)
‘–
filepath = Server.MapPath(“Bukutamu.mdb”)
‘—
strSQL = “INSERT INTO guest (Tanggal, Nama, Email, Komentar) VALUES (?, ?, ?, ?)”
‘—
set objconn = Server.CreateObject(“ADODB.Connection”)
objconn.mode = 3
objconn.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & filePath
‘—
set objcomm = Server.CreateObject(“ADODB.Command”)
objcomm.ActiveConnection = objconn
objcomm.CommandText = strSQL
‘—
set objpar = objcomm.CreateParameter(, adDate, ,8, reqtanggal)
objcomm.parameters.Append objpar
set objpar = objcomm.CreateParameter(, adChar, ,30, reqnama)
objcomm.parameters.Append objpar
set objpar = objcomm.CreateParameter(, adChar, ,30, reqemail)
objcomm.parameters.Append objpar
set objpar = objcomm.CreateParameter(, adChar, ,255, reqkomentar)
objcomm.parameters.Append objpar
objcomm.execute
objconn.close
%>
<%
response.write(“data berhasil diinput”)
%>
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar