iletişim formu

usungurhan

Üye
Kayıt
16 Mart 2011
Mesaj
4
Tepki
0
Tekstil Grafik Kursu
merhaba, html web sayfasının iletişim bölümüne bir form yapmaya çalıştım fakat başaralı olamadım. asp ile html sayfamın iletişim bölümünde form olmasını istiyorum.
ingilizce bir form

Name Surname :
E-mail :
Comments :
Send

bana yardımcı olursanız sevinirim. :) eğer email adres ve isim kısmı zorunlu olursa süper olur :D

şimdidedn teşekkürler
 

mintance

Üye
Kayıt
17 Mart 2011
Mesaj
8
Tepki
0
iletişim formu ve benzeri form ile kullanıcıdan bilgi istemek çin asp kod bilginiz olması gerekir.Kodlama bilgniz zayıf ise hazır scriptleri kulanın alanları istediğiniz gibi editleyebilirsiniz scriptlerdeki
 

usungurhan

Üye
Kayıt
16 Mart 2011
Mesaj
4
Tepki
0
peki bu script leri nerden bulabilirim, bana bir kaç örnek verebilirsen sevinirim
 
Kayıt
1 Kasım 2009
Mesaj
5
Tepki
2
default.asp

Kod:
<%Response.redirect("iletisim.asp")%>
veriyolu.asp

Kod:
<%
Set ugurbayindir=server.CreateObject("ADODB.Connection")
ugurbayindir.open "provider=Microsoft.Jet.OLEDB.4.0 ; Data Source="&server.MapPath("iletisim.mdb")
%>
iletisim.asp

Kod:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta **********="Content-Type" content="text/html; charset=iso-8859-9" />
<title>İletişim Formu</title>


</head>

<body>
<!--#include file="veriyolu.asp" -->
<%

dim ad, soyad, mail, konu, mesaj,cevap
    ad=request.form("ad")
    soyad=request.form("soyad")
    mail=request.form("mail")
    konu=request.form("konu")
    mesaj=request.form("mesaj")
    guvenlik=request.form("guvenlik")
    guvenlik=int(guvenlik)
if request.querystring("islem")="gonder" then
    if session("sonuc")=guvenlik then
    else
        response.redirect("?mesaj=guvenlik")
    end if
    
         if ad="" or soyad="" or mail="" or konu="" or mesaj="" then
            response.redirect("?mesaj=bos-alan")
         else
            set rsiletisim=server.CreateObject("ADODB.Recordset")
            sqliletisim="select * from iletisim"
            rsiletisim.Open sqliletisim, ugurbayindir , 1, 3            
            rsiletisim.AddNew()
            rsiletisim("ad")=ad
            rsiletisim("soyad")=soyad
            rsiletisim("mail")=mail
            rsiletisim("konu")=konu
            rsiletisim("mesaj")=mesaj
            rsiletisim("ip")=session("ip")
            rsiletisim.Update
            rsiletisim.Close            
            response.redirect("?mesaj=basarili")
        end if

else
end if
%>    

<% ' Mesaj Bölümü %>
<% if request.querystring("mesaj")="guvenlik" then %>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #CC0000; padding:5px; margin-bottom:10px;">
<tr>
<td align="center">
<span style="font-family:Tahoma; font-size:12px; color:#CC0000;">Güvenlik Kodunu Hatalı Girdiniz!</span>
</td>
</tr>
</table>
<% elseif request.querystring("mesaj")="bos-alan" then %>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #CC0000; padding:5px; margin-bottom:10px;">
<tr>
<td align="center">
<span style="font-family:Tahoma; font-size:12px; color:#CC0000;">Lütfen Tüm Alanları Eksiksiz Doldurunuz!</span>
</td>
</tr>
</table>
<% elseif request.querystring("mesaj")="basarili" then %>
<div align="center">
<table width="400" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #008000; padding:5px; margin-bottom:10px">
<tr>
<td align="center">
<span style="font-family:Tahoma; font-size:12px; color:#008000;">Tebrikler Mesajınız Başarılı Bir Şekilde İletilmiştir.</span><font color="#008000">
</font>
</td>
</tr>
</table>
</div>
<% 
else
end if
%>


<% ' Mesaj Bölümü %>


<form action="?islem=gonder" method="post" style="margin: 0px;" name="iletisim" id="iletisim">
<% 
Dim sayi,sayi2
Randomize 
sayi = int((Rnd * 15 )+1 ) 
sayi2 = int((Rnd * 15 )+1 ) 
session("sonuc")=sayi+sayi2
%>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #666;">
  <tr>
    <td height="30" colspan="3" align="center" bgcolor="#0099CC" style="border-bottom:1px solid #666;">
    <a style="text-decoration: none" target="_blank" href="http://www.ugurbayindir.com">
    <span style="font-family:Tahoma; font-size:12px; color:#FFF; font-weight:700">Ub-Soft İletişim Formu </span>
    </a></td>
  </tr>
  <tr>
    <td width="103" height="30" align="left" bgcolor="#F5F5F5"><span style="font-family:Tahoma; font-size:12px; color:#000;">&nbsp;Adınız *</span></td>
    <td width="5" align="center" bgcolor="#F5F5F5"><span style="font-family:Tahoma; font-size:12px; color:#000;">:</span></td>
    <td width="292" align="center" bgcolor="#F5F5F5"><span style="font-family:Tahoma; font-size:12px; color:#000;">
    <input type="text" name="ad" id="ad" style="width:280px; border:1px solid #666;" /></span></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#F3F3F3"><span style="font-family:Tahoma; font-size:12px; color:#000;">&nbsp;Soyadınız *</span></td>
    <td align="center" bgcolor="#F3F3F3"><span style="font-family:Tahoma; font-size:12px; color:#000;">:</span></td>
    <td align="center" bgcolor="#EEEEEE"><span style="font-family:Tahoma; font-size:12px; color:#000;">
      <input type="text" name="soyad" style="width:280px; border:1px solid #666;" id="soyad" />
    </span></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#F5F5F5"><span style="font-family:Tahoma; font-size:12px; color:#000;">&nbsp;Mail Adresiniz</span></td>
    <td align="center" bgcolor="#F5F5F5"><span style="font-family:Tahoma; font-size:12px; color:#000;">:</span></td>
    <td align="center" bgcolor="#F5F5F5"><span style="font-family:Tahoma; font-size:12px; color:#000;">
      <input type="text" name="mail" style="width:280px; border:1px solid #666;" id="mail" />
    </span></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#EEEEEE"><span style="font-family:Tahoma; font-size:12px; color:#000;">&nbsp;Konu *</span></td>
    <td align="center" bgcolor="#EEEEEE"><span style="font-family:Tahoma; font-size:12px; color:#000;">:</span></td>
    <td align="center" bgcolor="#EEEEEE"><span style="font-family:Tahoma; font-size:12px; color:#000;">
      <input type="text" name="konu" style="width:280px; border:1px solid #666;" id="konu" />
    </span></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#F5F5F5"><span style="font-family:Tahoma; font-size:12px; color:#000;">&nbsp;Mesaj *</span></td>
    <td align="center" bgcolor="#F5F5F5"><span style="font-family:Tahoma; font-size:12px; color:#000;">:</span></td>
    <td align="center" bgcolor="#F5F5F5"><span style="font-family:Tahoma; font-size:12px; color:#000;">
      <textarea name="mesaj" id="mesaj" rows="5" style="width:280px; border:1px solid #666;"></textarea>
    </span></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#EEEEEE">
    <span style="font-family:Tahoma; font-size:12px; color:#000;">&nbsp;
    <%=sayi%>&nbsp;+&nbsp;<%=sayi2%>&nbsp;=&nbsp;? *</span>
    </td>
    <td align="center" bgcolor="#EEEEEE"><span style="font-family:Tahoma; font-size:12px; color:#000;">:</span></td>
    <td align="center" bgcolor="#EEEEEE"><span style="font-family:Tahoma; font-size:12px; color:#000;">
      <input type="text" name="guvenlik" style="width:280px; border:1px solid #666;" id="guvenlik" />
    </span></td>
  </tr>
  <tr>
    <td height="38" align="left" bgcolor="#F5F5F5">&nbsp;</td>
    <td align="center" bgcolor="#F5F5F5">&nbsp;</td>
    <td align="center" bgcolor="#F5F5F5">
    <input type="submit" value="Gönder" style="border:1px solid #666; background-color:#0099CC; color:#FFF; padding:2px; cursor:pointer;" onclick="kontrol();" /></td>
  </tr>
  <tr>
    <td height="38" align="left" bgcolor="#EEEEEE" colspan="3">
    

<p align="center"><b>
    

<%
Dim temp, ip
temp = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If temp <> "" Then
ip = temp
Else
ip = Request.ServerVariables("REMOTE_ADDR")
End If
session("ip")=ip
%>
IP adresiniz: <% Response.Write session("ip") %>
    </b>
    </td>
  </tr>
</table>
</form>

</body>
</html>
admin adında klasör oluşturuyoruz

default.asp

Kod:
<%
if session("oturum")="admin" then
else
response.redirect("login.asp")
end if
if request.querystring("islem")="cikis" then
session("oturum")=""
response.redirect("login.asp")
else
end if
%>
<%
if request.querystring("mesaj")="basarili" then
%>
<div align="center">
<table width="400" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #008000; padding:5px; margin-bottom:10px">
<tr>
<td align="center">
<span style="font-family:Tahoma; font-size:12px; color:#008000;">Başarılı Bir Şekilde Silinmiştir.</span><font color="#008000">
</font>
</td>
</tr>
</table>
</div>
<%
else
end if
%>

<!--#include file="veriyolu.asp" -->
<p>&nbsp;</p>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #666;" id="table1">
  <tr>
    <td height="30" colspan="4" align="center" bgcolor="#0099CC" style="border-bottom:1px solid #666;">
    <span style="font-family: Tahoma; font-weight: 700; font-size: 12px; color: #FFFFFF">
    Yönetim Paneli - <a href="?islem=cikis" style="text-decoration: none">
    <font color="#FFFFFF">Çıkış Yap</font></a></span></td>
  </tr>
  <%
 if request.querystring("islem")="" then
  %>
 <%
  set rsiletisim=server.CreateObject("ADODB.Recordset")
  sqliletisim="select * from iletisim"
  rsiletisim.Open sqliletisim, ugurbayindir , 1, 3    
  dim i
  i=0
  while NOT rsiletisim.eof
  i=i+1
  %>
  <tr>
    <td height="30" align="left" bgcolor="#F3F3F3" width="51"><b><%=i%></b></td>
    <td align="center" bgcolor="#F3F3F3" width="256"><%=rsiletisim("ad")%>&nbsp;<%=rsiletisim("soyad")%></td>
    <td align="center" bgcolor="#EEEEEE" width="50"><b>
    <a href="?islem=oku&MesajID=<%=rsiletisim("id")%>" style="text-decoration: none">
    <font color="#000000">OKU</font></a></b></td>
    <td align="center" bgcolor="#EEEEEE" width="41"><b>
    <a href="?islem=sil&MesajID=<%=rsiletisim("id")%>" style="text-decoration: none">
    <font color="#000000">SİL</font></a></b></td>
  </tr>
  <%
  rsiletisim.movenext
  wend
  elseif request.querystring("islem")="oku" then
  set rsmesajoku=server.CreateObject("ADODB.Recordset")
  sqlmesajoku="select * from iletisim where id="&request.querystring("MesajID")
  rsmesajoku.Open sqlmesajoku, ugurbayindir , 1, 3    
  %>
  <tr>
    <td height="30" align="left" bgcolor="#F3F3F3" width="51"><b>Ad</b></td>
    <td height="30" align="left" bgcolor="#F3F3F3" width="347" colspan="3">:<%=rsmesajoku("ad")%></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#F3F3F3" width="51"><b>Soyad</b></td>
    <td height="30" align="left" bgcolor="#F3F3F3" width="347" colspan="3">:<%=rsmesajoku("soyad")%></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#F3F3F3" width="51"><b>Mail</b></td>
    <td height="30" align="left" bgcolor="#F3F3F3" width="347" colspan="3">:<%=rsmesajoku("mail")%></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#F3F3F3" width="51"><b>Konu</b></td>
    <td height="30" align="left" bgcolor="#F3F3F3" width="347" colspan="3">:<%=rsmesajoku("konu")%></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#EEEEEE" width="51"><b>Mesaj</b></td>
    <td height="30" align="left" bgcolor="#EEEEEE" width="347" colspan="3">:<%=rsmesajoku("mesaj")%></td>
  </tr>
   <tr>
    <td height="30" align="left" bgcolor="#F3F3F3" width="51"><b>IP NO</b></td>
    <td height="30" align="left" bgcolor="#F3F3F3" width="347" colspan="3">:<%=rsmesajoku("ip")%></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#F3F3F3" width="398" colspan="4">
    <p align="center"><b><a href="default.asp" style="text-decoration: none">
    Geri Dön</a> - <font color="#FF0000">
    <a href="?islem=sil&MesajID=<%=rsmesajoku("id")%>" style="text-decoration: none">Sil</a></font></b></td>
  </tr>
  <%
  elseif request.querystring("islem")="sil" then
  %>
  <tr>
    <td height="30" align="center" bgcolor="#F3F3F3" width="398" colspan="4">
    <b>Mesajı Silmek İstediğinize Emin Misiniz?</b></td>
  </tr>
    <tr>
    <td height="30" align="center" bgcolor="#F3F3F3" width="398" colspan="4">
    <font color="#008000"><b>
    <a href="?islem=sil2&MesajID=<%=request.querystring("MesajID")%>" style="text-decoration: none">
    <font color="#008000">EVET</font></a></b></font></td>
  </tr>
  <tr>
    <td height="30" align="center" bgcolor="#F3F3F3" width="398" colspan="4">
    <font color="#FF0000"><b>
    <a href="default.asp" style="text-decoration: none"><font color="#FF0000">
    HAYIR</font></a></b></font></td>
  </tr>
  <%
  elseif request.querystring("islem")="sil2" then

  set rssil=server.CreateObject("ADODB.Recordset")
  sqlsil="select * from iletisim where id="&request.querystring("MesajID")
  rssil.Open sqlsil, ugurbayindir , 1, 3    
                                rssil.Delete()
                                rssil.Update
                                rssil.Close
                                response.redirect("?mesaj=basarili")
  else
  end if
 %>
  
  </table>
veriyolu.asp

Kod:
<%
Set ugurbayindir=server.CreateObject("ADODB.Connection")
ugurbayindir.open "provider=Microsoft.Jet.OLEDB.4.0 ; Data Source="&server.MapPath("../iletisim.mdb")
%>
login.asp

Kod:
<%
sifre="admin"
%>

<%
if request.querystring("mesaj")="hatali-sifre" then
%>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #CC0000; padding:5px; margin-bottom:10px;">
<tr>
<td align="center">
<span style="font-family:Tahoma; font-size:12px; color:#CC0000;">Şifre Hatalı Girdiniz!</span>
</td>
</tr>
</table>
<%
else
end if
%>

<%
if request.querystring("islem")="giris" then
    if request.form("sifre")=sifre then
    session("oturum")="admin"
    response.redirect("default.asp")
    else
    response.redirect("?mesaj=hatali-sifre")
    end if
else
end if
%>
<p>&nbsp;</p>
<p>&nbsp;</p>
<form action="?islem=giris" method=post>
<div style="position: absolute; top: 57px; left: 313px; width: 400px; height: 92px; z-index: 1">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #666;" id="table1">
  <tr>
    <td height="30" colspan="3" align="center" bgcolor="#0099CC" style="border-bottom:1px solid #666;">
    <span style="font-family: Tahoma; font-weight: 700; font-size: 12px; color: #FFFFFF">
    Yönetim Paneli</span></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#F3F3F3"><span style="font-family:Tahoma; font-size:12px; color:#000;">
    &nbsp;Sifre </span></td>
    <td align="center" bgcolor="#F3F3F3"><span style="font-family:Tahoma; font-size:12px; color:#000;">:</span></td>
    <td align="center" bgcolor="#EEEEEE"><span style="font-family:Tahoma; font-size:12px; color:#000;">
      <input type="text" name="sifre" style="width:280px; border:1px solid #666;" id="sifre" />
    </span></td>
  </tr>
  <tr>
    <td height="30" align="left" bgcolor="#F3F3F3">&nbsp;</td>
    <td align="center" bgcolor="#F3F3F3">&nbsp;</td>
    <td align="center" bgcolor="#EEEEEE">
    <input type="submit" value="GİRİŞ YAP" style="border:1px solid #666; background-color:#0099CC; color:#FFF; padding:2px; cursor:pointer;" onclick="kontrol();" /></td>
  </tr>
</table>
</div>
</form>
 
Yukarı Alt