Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8809489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:53:18+00:00 2026-06-14T02:53:18+00:00

The issue I am having is the form submits data to a payment processing

  • 0

The issue I am having is the form submits data to a payment processing company.

the captcha I implemented is located here:
http://www.php-help.ro/examples/math_captcha_image
for this to work the form most submit to self or to a php page that I have access to
instead here is the form code:

<form action="https://secure.bluepay.com/interfaces/bp10emu" method=POST>

      <input type=hidden name=MERCHANT value="100105032970">
      <tr><td>Zipcode:</td><td><input type=text name=ZIPCODE></td></tr>
      <tr><td>Phone:</td><td><input type=text name=PHONE></td></tr>
      <tr><td>Email:</td><td><input type=text name=EMAIL></td></tr>
      <tr><td>Captcha:</td><td>    <input type="text" name="secure" value="what's the result?" onClick="this.value=''" /><br><br>
      <img src="image.php" alt="Click to reload image" title="Click to reload image" id="captcha" onClick="javascript:reloadCaptcha()" />
      </td></tr>
      <tr><td colspan=2><input type=SUBMIT value="Pay Now"></td></tr>

    </table>
    </form>

the script works perfectly when implentated on a form that submits to self. but since its posting to bluepay.com I am not sure on how to get it to verify captcha BEFORE submitting. any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:53:20+00:00Added an answer on June 14, 2026 at 2:53 am

    Method 1: Use JavaScript

    Since you are going to submit it to another application, it would be better to check with JavaScript for the correctness. So, you can just fire an AJAX Event using jQuery to check if the given answer is correct by passing the CAPTCHA User Input value to the page that performs the check. If it is correct, then submit the form.

    Consider this code:

    <?php
        if ($_POST["captcha"] == $_SESSION["captcha"])
            die ("OK");
        else
            die ("No");
    ?>
    

    And in the JavaScript, you can use jQuery‘s $.post() function this way:

    $("form").submit(function(){
        $.post({
            url: 'check.php',
            data: $("input[name='captcha']").val(),
            success: function(data) {
                if (data == "OK")
                    return true;
                else
                    alert("CAPTCHA Fail!");
                return false;
            }
        });
    });
    

    Method 2: Use cURL

    You can use a function like this:

    function post_to_url($url, $data) {
       $fields = '';
       foreach($data as $key => $value) { 
          $fields .= $key . '=' . $value . '&'; 
       }
       rtrim($fields, '&');
    
       $post = curl_init();
    
       curl_setopt($post, CURLOPT_URL, $url);
       curl_setopt($post, CURLOPT_POST, count($data));
       curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
       curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
    
       $result = curl_exec($post);
    
       curl_close($post);
    }
    

    Check the CAPTCHA and then process the form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having an issue when processing form data. When the form is submitted,
Here's an issue I'm having with the .ajaxForm() method of the jQuery Form Plugin
I am having an issue here with a form being posted via Ajax. Here
I am having a small issue, I am trying to run a $(form#picform).submit after
as part of my time isn't dedicated to PHP dev, I'm having an issue
I have a form that submits data to a database in a CodeIgniter app
I'm having an issue with a Struts 1 form, which contains a logic:iterate in
I'm having a strange issue with my form in CakePHP. I have a series
I have a strange issue here - see below. Page X Contain a form
I am using asp.net MVC and I am having an issue posting a form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.