Home

<%option explicit%>

<html>
<head>
<title> Terima Kasih </title>
<!–by Universitas Respati –>
<!– Agus Briyan TI – Malam –>
</head>
<body>
<!–#include File=”adovbs.inc”–>
<%
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”)
%>
</body>
</html>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s