title: integrating reCaptcha into a form'a action to a coldfusion .cfm
body: <p>I'm trying to help a friend modify some old html code to eliminate spam from being passed from the web form to the coldfusion function. Basically, the web form calls  action=add_to_data.cfm. The friend wants to integrate recaptcha to cut down on spam going through the form. I've gotten that part to work and complete the reCaptcha verification. The problem is that I can't figure out how to call the coldfusion "add_to_data.cfm' action and pass along the form's data. There are plenty of recaptcha examples showing an exaple using action=mailer.php, but I need to send the form's data to coldfusion -- "add_to_data.cfm.</p>
  
  <p>the original form:</p>
  
  <pre><code>&lt;form method="post" action="add_to_data.CFm"&gt;
   ....blah, blah, blah ... form contents ...
  
  &lt;input type="submit" value="Please add to my Data /&gt;
  &lt;form&gt;
  </code></pre>
  
  <p>Now, with guidance from a google developers reCaptcha turtorial, instead of going straight to "add_to_data.CFm," the only way that I can figure out how to validate the reCaptcha is to change the form action from "add_to_data.CFm" to an 'action' to newly created "verify_recaptcha.php"  so that recaptcha can be validated.</p>
  
  <pre><code>&lt;form method="post" action="verify_recaptcha.php"&gt;
   ...original form contents ...
          &lt;?php
            require_once('recaptchalib.php');
            $publickey = "your_public_key_goes_here";
            echo recaptcha_get_html($publickey);
          ?&gt;
          &lt;input type="submit" /&gt;
  &lt;form&gt;
  </code></pre>
  
  <p>This example is straight from google developers web pages for recpatcha validation with verify_recaptcha.php</p>
  
  <pre><code>&lt;?php
    require_once('recaptchalib.php');
    $privatekey = "your_private_key_goes_here";
    $resp = recaptcha_check_answer ($privatekey,
                                  $_SERVER["REMOTE_ADDR"],
                                  $_POST["recaptcha_challenge_field"],
                                  $_POST["recaptcha_response_field"]);
  
      if (!$resp-&gt;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-&gt;error . ")");
  
       } else {
       // Your code here to handle a successful verification  
  
       *** this is where I need gather he form outputs and call add_to_data.CFM
       ***  but HOW??
  
       }
       ?&gt;
  </code></pre>
  
  <p>So my QUESTION is how to send the 'data' to add_to_data.CFm??</p>
  
  <p>I know that inside of the 'else' section above, that I can get the form variables like this:</p>
  
  <pre><code>$name = $_POST['yourname'];
  $email = $_POST['email'];
  $data = $_POST['data'];
  $comments = $_POST['comments'];
  $formsub = $_POST['Submit']; 
  </code></pre>
  
  <p>so the QUESTION is: HOW do I complete the form submit action to "add_to_data.CFM"??</p>
  
  <p>thanks in advance</p>