Jump to content

Iletişim Formumda Ne Yanlışlık Var?


Recommended Posts

Arkadaşlar dreamweaver da iletişim formu  ekledim, bir de gonder.php dosyası ekledim içerikleri aşağıdadır. Fakat sorun nerede anlamadım gönder butonuna bastığımda göndermesini istediğim mail adresine bir türlü mail gelmiyor yardım ederseniz memnun olurum.

 

 

İLETİŞİM FORMUMDA YER ALAN HTML KODLARI


<form action="gonder.php" method="post">
<table width="500" border="0" bgcolor="#e2e2e2" font face="Thoma" size="2" align="center" cellpadding="20" cellspacing="20">
<tr>
<th colspan="2"  scope="col"> Site İletişim Formu </th>
</tr>
<tr>
<td>
<pre>
ADINIZ    :  <input type="text" name="isim"><br>
SOYADINIZ :  <input type="text" name="soyad"><br>
E-POSTA    : <input type="text" name="mail"><br>
YORUM     :  <textarea  cols="30" rows="10" name="yorum">Bu alana yorum yapabilirsiniz</textarea><br>
  
<input type="submit" value="GÖNDER">    <input type="reset" value="TEMİZLE">
</pre>
</td>
</tr>
</table>
</form>

 

 

 

BU DA GONDER.PHP

 

<!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 profile="http://gmpg.org/xfn/11"><meta name="robots" content="noodp,noarchive">  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="msvalidate.01" content="802B4FCC2AB913A2972C8DF68B02A202"><meta http-equiv="content-language" content="tr"> </head>

<?php 

//formdan gelen bilgileri bu sayfaya çektik..
$isim=$_POST['isim'];
$soyad=$_POST['soyad'];
$mail=$_POST['mail'];
$yorum=$_POST['yorum'];
$ziyaret=$_POST['ziyaret'];

$emailadresi="[email protected]";  //kendi e-mail adresinizi yazin.
$emailkonusu="Site iletisim Formu";  //gönderilen e-mailde konu olarak ne görünmesiniz istiyorsaniz buraya onu yazin.

//bos alanlari kontrol ediyoruz..
if (empty($isim) or empty($soyad) or empty($mail) or empty($yorum)){  //burayi kendinize göre çogaltabilirsiniz
print ('Lütfen bütün alanlari eksiksiz olarak doldurunuz. <br>');  //eger bos alan var ise gerekli uyari mesaji.
print('<a href="http://denemefirma.com/iletisim.html">Form Sayfasina Geri Dön</a>');  //form sayfasina geri dönüs linki
}

//bos alan yok ise asagidan da e-mail gönderilecektir.
else { 
$emailicerigi="
isim: $isim  
Soyad: $soyad  
E-Mail: $mail  
Yorum: $yorum
Ziyaret: $ziyaret";  
if(mail($emailadresi,$emailkonusu,$emailicerigi)){
print ('E-Mailiniz basarili bir sekilde gönderilmistir. ilginize tesekkür ederiz...!!! <a href="http://denemefirma.com/">Anasayfaya Geri Dön</a>'); //bu uyari yazisida mail gönderildiginde çikacaktir.. 
}
} 

?>

 

 

Link to comment
Share on other sites

  • 1 ay sonra...

Maili gonderecegin satiri eklememissin. Asagidaki ornegi incele. mail() satirin eksik kalmis

 

 

 

  $email = $_REQUEST['email'] ;
  $subject = $_REQUEST['subject'] ;
  $message = $_REQUEST['message'] ;
  mail("[email protected]", $subject,
  $message, "From:" . $email);
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...