I wonder why whether I fill in the recaptcha or left it empty, I still receive the e-mail message.

We've received your contact information

<div id="form">
<form action="kontak_action.php" method="get">
<table border="0">
<tr align="left">
    <th>Nama&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</th>
    <th><input type="text" name="nama" size="25"/></th>
</tr>
<tr align="left">
    <th>Email&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</th>
    <th><input type="text" name="email" size="25" /></th>
</tr>
<tr align="left">
    <th>Telp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</th>
    <th><input type="text" name="telp" size="25" /></th>
</tr>
<tr align="left">
    <th>Komentar :</th>
    <th><textarea name="question" cols="30" rows="5"></textarea></th>
</tr>
<tr>
<th><input type="button" value="Show reCAPTCHA" onclick="showRecaptcha('recaptcha_div');"></input></th>
<th></th>
</tr>
<tr>
<td colspan="2"><div id="recaptcha_div"><script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=6LdNVtMSAAAAAI-k_TFX4X_mICUsXJ3UAquWvuGl">
</script></div></td>
</tr>
<tr>
<td><br></td>
<td><br></td>
</tr>
<tr align="left">
    <th></th>
    <th><input type="submit" value="Submit" /></th>
</tr>
</table>
</form> 

Check this link: Click Here

Hi,

I think that you forgot to verify fields and the captcha in kontak_action.php because even if I leave all fields blank and I click the submit button it shows me this message: step XWe've received your contact information.

How to verify the captcha and the fields?

I have this underneath the submit form:

<?php
  require_once('recaptchalib.php');
  $privatekey = "your_private_key";
  $resp = recaptcha_check_answer ($privatekey,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

  if (!$resp->is_valid) {
    // What happens when the CAPTCHA was entered incorrectly
    die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
         "(reCAPTCHA said: " . $resp->error . ")");
  } else {
    // Your code here to handle a successful verification
  }
  ?>

Warning: require_once(recaptchalib.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\Rustoleum\konsultasi-konsumen.php on line 117

Fatal error: require_once() [function.require]: Failed opening required 'recaptchalib.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\Rustoleum\konsultasi-konsumen.php on line 117

Where can I get the recaptchalib.php?

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.