Jump to content

asp vbscript


Pekdi

Recommended Posts

abng2 & kk2 yg tw ttg asp vbscript,, tolong koreksi script ini donk,, sya copas dr buku,, u/ data tgl lahir & tgl login tdk masuk dlm DB,, ttp tdk da error. yg sya mohon bantuan'y,, bagaimana format tgl yg d'gunakan??... sya lg bljr u/ mengetahui'y sblum ke asp.net... mohon bantuan'y. Berikut script'y:

 

<%response.buffer=true%>

<html>

<head>

<meta name="GENERATOR" content="Microsoft FrontPage 5.0">

<meta name="Progld" content="FrontPage.Editor.Document">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>Simpan Data Anggota</title>

</head>

 

<body>

<%

dim cn,rs,kriteria,tgllahir,mysql

set cn=server.createobject("ADODB.Connection")

cn.open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.mappath("Ecommerce.mdb"))

set rs=server.createobject("ADODB.Recordset")

rs.open "Anggota",cn,adOpenKeyset,3

 

kriteria="User_Name='" & request.form("User_Name") & "'"

 

tgllahir=request.form("bulan") & "/" & request.form("tgl")

tgllahir=tgllahir & "/" & request.form("Tahun")

 

if rs.eof Or rs.bof then

rs.addnew

rs("User_Name") = request.form("User_Name")

rs("kunci") = request.form("Password")

rs("Nama_Lengkap")=request.form("Nama_Lengkap")

rs("Tempat_lahir")=request.form("Tempat_Lahir")

rs("Tanggal_lahir")=request.form("tgllahir")

rs("Alamat_Rumah")=request.form("Alamat_Rumah")

rs("Telepon_Rumah")=request.form("Telepon_rumah")

rs("Email")=request.form("Email")

rs("Nama_Perusahaan") = request.form("Nama_Perusahaan")

rs("Alamat_Perusahaan") = request.form("Alamat_Perusahaan")

rs("Telepon_Perusahaan") = request.form("Telepon_Perusahaan")

rs("Tgl_mulai_anggota") = request.form("date")

rs.update

end if

 

rs.close

cn.close

set rs=nothing

set cn=nothing

%>

<p>Data Telah Disimpan</p>

<p>Silahkan <a href="index.asp">Login</a></p>

 

</body>

</html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...