ibrahimkaya396
New member
- Katılım
- 22 Eyl 2005
- Mesajlar
- 954
- Reaction score
- 0
- Puanları
- 0
ilk önce bi veritabanı hazılayalım 2 dk da
veritabanının ismi depo olsun gene tabi bunun içine bide tablo oluşturalım
tablonun adı defter olsun
tablonun içine bi tak tane satır açalım
id otomatik sayı olsun,
adi not olsun,
e_mail not olsun,
mesaj buda not olsun
sonra komutlara geçelim
forum.html diye bi sayfa acalım 2 dk da hemen cik
<html>
<head>
<title>www.sisafgrup.com</title>
</head>
<body>
<form method="POST" action="kayit.asp">
<p>adınız:<input type="text" name="adi" size="20"><br>
e-mail adresiniz<input type="text" name="e_mail" size="20"><br>
mesajınız:<textarea rows="2" name="mesaj" cols="20"></textarea><br>
<input type="submit" value="Gönder" name="B1"><input type="reset" value="Sıfırla" name="B2"></p>
</form>
</body>
</html>
kayit.asp yi hemen yapalım
<html>
<head>
<title>www.sisafgrup.com</title>
</head>
<body>
<%
Set Baglanti = Server.CreateObject("ADODB.Connection")
Baglanti.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("veri_tabani\online.mdb")
adi = Request.Form ("adi")
sifre = Request.Form ("e_mail")
mesaj = Request.Form ("mesaj")
Set Kayit = Server.CreateObject ("ADODB.RecordSet")
Sql_Komutu = "Select * from kullanicilar"
Kayit.Open Sql_Komutu, Baglanti, 1, 3
Kayit.AddNew
Kayit("kullanici_adi")=adi
Kayit("sifre")=e_mail
Kayit("mesaj")mesaj
Kayit.Update
Kayit.close
Set Kayit = Nothing
%>
<%
Response.Redirect "defter_oku.asp"
%>
</body>
</html>
bide defter_oku.asp diye bi sayfa acalım ve kim ne yazmış bi okuyalım
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>www.sisafgrup.com</title>
</head>
<body>
<%
Set Baglanti = Server.CreateObject("ADODB.Connection")
Baglanti.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("depo.mdb")
Set Kayit = Server.CreateObject("ADODB.Recordset")
Sql_Komutu = "Select * from defter"
Kayit.Open Sql_Komutu, Baglanti, 1, 3
Do while not Kayit.eof
%>
<table border="1" width="552" height="54">
<tr>
<td width="72" height="23">
adi soyadi</td>
<td width="169" height="23">
<%=Kayit("adi")%></td>
<td width="145" height="23">
e-mail adresi</td>
<td width="144" height="23">
<%=Kayit("e_mail")%></td>
</tr>
<tr>
<td colspan="4" height="23">
mesaj:<%=Kayit("mesaj")%></td>
</tr>
</table>
<%
Kayit.MoveNext
Loop
%>
</body>
</html>
işte defteride okuduk hepsi bu kadar... :biggrin :biggrin
veritabanının ismi depo olsun gene tabi bunun içine bide tablo oluşturalım
tablonun adı defter olsun
tablonun içine bi tak tane satır açalım
id otomatik sayı olsun,
adi not olsun,
e_mail not olsun,
mesaj buda not olsun
sonra komutlara geçelim
forum.html diye bi sayfa acalım 2 dk da hemen cik
<html>
<head>
<title>www.sisafgrup.com</title>
</head>
<body>
<form method="POST" action="kayit.asp">
<p>adınız:<input type="text" name="adi" size="20"><br>
e-mail adresiniz<input type="text" name="e_mail" size="20"><br>
mesajınız:<textarea rows="2" name="mesaj" cols="20"></textarea><br>
<input type="submit" value="Gönder" name="B1"><input type="reset" value="Sıfırla" name="B2"></p>
</form>
</body>
</html>
kayit.asp yi hemen yapalım
<html>
<head>
<title>www.sisafgrup.com</title>
</head>
<body>
<%
Set Baglanti = Server.CreateObject("ADODB.Connection")
Baglanti.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("veri_tabani\online.mdb")
adi = Request.Form ("adi")
sifre = Request.Form ("e_mail")
mesaj = Request.Form ("mesaj")
Set Kayit = Server.CreateObject ("ADODB.RecordSet")
Sql_Komutu = "Select * from kullanicilar"
Kayit.Open Sql_Komutu, Baglanti, 1, 3
Kayit.AddNew
Kayit("kullanici_adi")=adi
Kayit("sifre")=e_mail
Kayit("mesaj")mesaj
Kayit.Update
Kayit.close
Set Kayit = Nothing
%>
<%
Response.Redirect "defter_oku.asp"
%>
</body>
</html>
bide defter_oku.asp diye bi sayfa acalım ve kim ne yazmış bi okuyalım
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>www.sisafgrup.com</title>
</head>
<body>
<%
Set Baglanti = Server.CreateObject("ADODB.Connection")
Baglanti.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("depo.mdb")
Set Kayit = Server.CreateObject("ADODB.Recordset")
Sql_Komutu = "Select * from defter"
Kayit.Open Sql_Komutu, Baglanti, 1, 3
Do while not Kayit.eof
%>
<table border="1" width="552" height="54">
<tr>
<td width="72" height="23">
adi soyadi</td>
<td width="169" height="23">
<%=Kayit("adi")%></td>
<td width="145" height="23">
e-mail adresi</td>
<td width="144" height="23">
<%=Kayit("e_mail")%></td>
</tr>
<tr>
<td colspan="4" height="23">
mesaj:<%=Kayit("mesaj")%></td>
</tr>
</table>
<%
Kayit.MoveNext
Loop
%>
</body>
</html>
işte defteride okuduk hepsi bu kadar... :biggrin :biggrin