Hi :)

i have a question , i have a form on my webpage and i have sendform.php i want to send the form on the page with e-mail to my info e-mail. when i click the send button , i am receiving blank email :( can you help me about this ?

thanks
best regards
marco

web page is :

<!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>
<title>Teknofan İnsan Kaynakları</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
    <link href="csss.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="style.css"  media="screen"/>
    <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>
    <script type="text/javascript" src="js/jquery.cycle.all.min.js"></script>
    <script type="text/javascript" src="js/cloud-carousel.1.0.3.min.js"></script>

<style type="text/css">
    #carousel{width: 700px; height: 150px; background-color: #111; position: absolute; top: 200px; left: 100px;}
    #carousel a{position: absolute; width: 110px;}
</style>
    <script type="text/javascript">
      jQuery(function() {
          jQuery('a.lightbox').lightBox();
      });
    </script>

</head>

<body>
<? include('ust.php'); ?>
<div id="link"> <a href="index.php" class="link">Ana Sayfa</a>&nbsp;&nbsp;<img src="images/breadcr_arrow.gif" with="7" height="7" /> <a href="teknofan.php" class="link">Kurumsal</a> </div>
<div id="orta">
  <div id="ortamenu">
    <div class="ortamenulinkler"><a href="teknofan.php">Şirket Profili </a></div>
    <div class="ortamenulinkler"><a href="teknofan-misyon-vizyon.php">Misyon / Vizyon </a></div>
    <div class="ortamenulinkler"><a href="teknofan-degerler.php">Değerlerimiz</a> </div>
    <div class="ortamenulinkler"><a href="teknofan-insankaynaklari.php">İnsan Kaynakları </a></div>
    <div class="ortamenulinkler">&nbsp;</div>
  </div>
<div id="ortaorta">
  <p><img src="images/career.jpg" width="540" height="214" /></p>
  <p>&nbsp;</p>

<form id="form1" name="form1" method="post" action="sendform.php">
  <table width="540" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="150" height="30" align="left" name="name">Adınız Soyadınız </td>
      <td width="390" align="left">
        <label>
        <input name="textfield" type="text" size="30" />
        </label>
      </td>
    </tr>
    <tr>
      <td height="30" align="left">Doğum Tarihiniz </td>
      <td align="left">
        <input name="textfield2" type="text" size="30" />
      </td>
    </tr>
    <tr>
      <td height="30" align="left">Cinsiyet</td>
      <td align="left">Bayan 
             <label>
             <input name="cinsiyet" type="radio" value="bayan" />
             </label>
     &nbsp;&nbsp;&nbsp; Bay 
     <label>
     <input name="cinsiyet" type="radio" value="bay" />
     </label>
      </td>
    </tr>
    <tr>
      <td height="30" align="left">Medeni Haliniz </td>
      <td align="left">Evli 
        <label>
        <input name="medeni" type="radio" value="evli" />
        </label>
     &nbsp;&nbsp;&nbsp; Bekar 
     <label>
     <input name="medeni" type="radio" value="bekar" />
     </label>
      </td>
    </tr>
    <tr>
      <td align="left">Adresiniz</td>
      <td align="left">
        <label>
        <textarea name="adres" cols="35" rows="5" id="adres"></textarea>
        </label>
      </td>
    </tr>
    <tr>
      <td height="30" align="left">Telefon</td>
      <td align="left">
        <input name="textfield3" type="text" size="30" />
      </td>
    </tr>
    <tr>
      <td height="30" align="left">GSM</td>
      <td align="left">
        <input name="textfield4" type="text" size="30" />
      </td>
    </tr>
    <tr>
      <td height="30" align="left">E-Posta Adresiniz </td>
      <td align="left">
        <input name="textfield5" type="text" size="30" />
      </td>
    </tr>
    <tr>
      <td height="30" align="left">Öğrenim Durumunuz </td>
      <td align="left">Lise
        <label>
        <input name="ogrenim" type="radio" value="lise" />
        </label> 
     &nbsp;&nbsp; Ön Lisans
      <label>
      <input name="ogrenim" type="radio" value="onlisans" />
    &nbsp; </label> 
     &nbsp; Lisans
      <label>
      <input name="ogrenim" type="radio" value="lisans" />
      </label> 
     &nbsp;&nbsp; Yük.Lisans   
      <label>
      <input name="ogrenim" type="radio" value="yuk.lisans" />
&nbsp;      </label> 
     &nbsp; Doktora
      <label>
      <input name="ogrenim" type="radio" value="doktora" />
      </label>
</td>
    </tr>
    <tr>
      <td height="30" align="left">Okul / Bölüm Adı </td>
      <td align="left">
        <input name="textfield6" type="text" size="30" />
      </td>
    </tr>
    <tr>
      <td height="30" align="left">Askerlik Durumu </td>
      <td align="left">Yapıldı
        <label>
        <input name="askerlik" type="radio" value="yapıldı" />
        </label> 
     &nbsp;&nbsp; Yapılmadı 
      <label>
      <input name="askerlik" type="radio" value="yapılmadı" />
      </label>
      </td>
    </tr>
    <tr>
      <td height="30" align="left">Yabancı Dil (ingilizce) </td>
      <td align="left"> az
        <label>
        <input name="dil" type="radio" value="az" />
        </label> 
     &nbsp;&nbsp;&nbsp; orta
      <label>
      <input name="dil" type="radio" value="orta" />
      </label> 
     &nbsp;&nbsp;&nbsp; iyi
      <label>
      <input name="dil" type="radio" value="iyi" />
      </label> 
     &nbsp;&nbsp; çok iyi 
      <label>
      <input name="dil" type="radio" value="çok iyi" />
      </label>
      </td>
    </tr>
    <tr>
      <td height="30" align="left">Ehliyet</td>
      <td align="left">Var
        <label>
        <input name="ehliyet" type="radio" value="var" />
        </label> 
     &nbsp;&nbsp;&nbsp; Yok 
     <label>
     <input name="ehliyet" type="radio" value="yok" />
     </label>
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td height="30" valign="top">
        <label>
        <input type="submit" name="Submit" id="submit" value="Gönder" />
        </label>
      </td>
    </tr>
  </table>
</form>
  </div>

  <div id="ortasag">
    <div id="haberler">HABERLER </div>
    <div class="haberlericerik"><? include('teknohaber.php'); ?></div>
    <div id="haberler">İLETİŞİM </div>
    <div class="haberlericerik">info@teknofan.com.tr<br />
    0216 499 14 64 </div>
  </div>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</div>
<? include('alt.php')?>

</body>
</html>

and this is send form : ( i find on daniweb.com thanksss!! but it is not working , sending blank e-mail:( )

<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php
$Name = $_POST['Teknofan']; //senders name
$email = $_POST['info@teknofan.com']; //senders e-mail adress
$recipient = "kaner@elektroteknik.com.tr"; //recipient
$mail_body = $_POST['$name']; //mail body
$subject = "Mail From Website Visitor"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields

mail($recipient, $subject, $mail_body, $header); //mail command :) you can add any variable here... I know you have so many, but it is possible...
if(mail)
    echo "Okey! We Are Proceed. Thank You !";
else
    echo "Sorry We Can't Proceed, Please Try After Some Time!";
?>
</body>
</html>

The names in the $_POST array have to be the same as the name attributes of form fileds i.e.:

<input name="email" type="text" size="30" />

<?php $email = $_POST['email'];?>

It is much easier if the name attribtes and the variables are the same.

i am really sorry , i am not good on this kind things, i dont understand your mean ! how i can do that ?

Your first input field is:

<input name="textfield" type="text" size="30" />

and the code to process it should be:

<?php $textfield = $_POST['textfield'];?>

But unfortunately I do not know what textfield is for. If it is for example for the email it should have meaningful name like:

<input name="email" type="text" size="30" />

<?php $email = $_POST['email'];?>

And the name attributes for all fields and the associative indexes for the $_POST array should match.

Blindly copying code without understanding it might be unproductive and sometimes dangerous. You might want to seach Daniweb or google for PHP form processing.

Pleasenote: I will not be available until Monday. If you require more help and do not get it before I will be happy to help when I am back.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.