PHP recaptcha send mail konular

1 Cevap php

Hey çocuklar, kimse bana yardımcı olabilir eğer ben isterim ...

Ne i var gönderilen gitti şeklidir, doublecheck.php kullanır

<?php  
    require_once('recaptchalib.php');  
    $privatekey = "";  
    $resp = recaptcha_check_answer ($privatekey,  
    $_SERVER["REMOTE_ADDR"],   
    $_POST["recaptcha_challenge_field"],  
    $_POST["recaptcha_response_field"]);  
    if (!$resp->is_valid) {  
        die ("Sorry please go back and try it again." .  
            "" . $resp->error . ")");  
    }  
    if ($resp->is_valid) {  
        require_once('sendmail.php');  
    }    
?>

Ve sonra benim sendmail.php

<?php

    $ip = $_POST['ip'];
    $httpref = $_POST['httpref'];
    $httpagent = $_POST['httpagent'];
    $visitor = $_POST['visitor'];
    $notes = $_POST['notes'];
    $attn = $_POST['attn'];

    $todayis = date("l, F j, Y, g:i a");

    $attn = $attn ;
    $subject = $attn;

    $notes = stripcslashes($notes);

    $message = " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n
From: $visitor ($Your Prayer or Concern)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";

    $from = "From:\r\n";

    mail("", Prayers and Concerns, $message);

?>

<p align="center">
Date: <?php echo $todayis ?>
<br />
<br />

Attention: <?php echo $attn ?>
<br />
Message:<br />
<?php $notesout = str_replace("\r", "<br/>", $notes);
echo $notesout; ?>
<br />
<?php echo $ip ?>

<br /><br />
<a href="contact.php"> Next Page </a>
</p>
</body>
</html>

Onun başarılı i $ notları göndermek gerekiyor ama $ notlar her zaman boş olduğunda ne bir sabit zaman yaşıyorum olduğunu. Ben sadece benim başarılı php içinde benim sendmail php koymak gerekir? $ Notları boş neden ya da birisi bana açıklayabilir.

Ben benim recaptcha anahtar var, ve de ben bir e-posta adresi var. Ben, özel bazı şeyler tuttu da notlar textarea benim HTML var

İşte bu tablo benim html:

<form action="doublecheck.php" action="http://www.ipower.com/scripts/formemail.bml" enctype="application/x-www-form-urlencoded" method="post">
  <table>
    <tbody style="font-size: 12px;">
      <tr>
        <td width="661">Your Prayer or Concern<br/>
          <textarea name="notes" rows="6" cols="100" maxlength="1024"></textarea></td>
      </tr>
      <tr>
        <td><script type="text/javascript" src="http://api.recaptcha.net/challenge?k=6LdoKLoSAAAAAChm6Oaquimz8g1elKd5OQBJtCLm"></script>

<noscript>
    <iframe src="http://api.recaptcha.net/noscript?k=6LdoKLoSAAAAAChm6Oaquimz8g1elKd5OQBJtCLm" height="300" width="500" frameborder="0"></iframe><br/>
    <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
    <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript>                <p>
              <input type="submit" id="Pray" name="Pray" value="Send your prayer"/>
          </p></td>
      </tr>
      <tr>
      </tr>
    </tbody>

  </table>
</form>

1 Cevap

Ben LiveHeaders Firefox için fiş ve notlar alan olduğundan emin olmak için göndererek tam olarak ne şekilde veri bakmak almanızı öneririm. Eğer durum bu ise, o zaman $ _POST dizi dökümü ve düzgün alınan ediliyor emin olmak için var_dump kullanmayı deneyin.

PHP Development Tools Eclipse IDE için fiş oldukça iyi bir hata ayıklayıcı vardır. Bir hata ayıklayıcı atlama hatalrı bir demet ekleyerek daha bu tür sorun için genellikle daha kolaydır.