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 6909601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:42:37+00:00 2026-05-27T08:42:37+00:00

I have a form that when submited posts to remote url using curl the

  • 0

I have a form that when submited posts to remote url using curl the form post to it self and all works well but I know need to send the form data to a page for prossesing spliting the form code from the prossesing code has not worked.

my current code which works is.

<?php
if (!empty($_POST['btnApply_x'])) {
    $post['AffiliateID'] = '0000';
    $post['AffiliatePW'] = '00000';
    $post['ReqMode'] = 'TEST';
    $post['ReqLoanAmount'] = $_POST['slidval'];
    $post['ReqConsent'] = 1;
    $post['ReqIPAddress'] = $_SERVER['REMOTE_ADDR'];
    $post['AppTitle'] = $_POST['ddlTitle'];
    $post['AppFirstName'] = $_POST['txtFirstname'];
    $post['AppLastName'] = $_POST['txtSurname'];
    $post['AppEmail'] = $_POST['txtEmail'];
    $post['AppDOBDay'] = $_POST['ddlDay'];
    $post['AppDOBMonth'] = $_POST['ddlMonth'];
    $post['AppDOBYear'] = $_POST['ddlYear'];
    // $post['date_of_birth'] = $_POST['ddlDay'] . '/' . $_POST['ddlMonth'] . '/' . $_POST['ddlYear'];
    $post['AppHomePhone'] = $_POST['txtHomePhone'];
    $post['AppWorkPhone'] = $_POST['txtWorkPhone'];
    $post['AppMobilePhone'] = $_POST['txtMobile'];
    // $post['BankDebitCard'] = $_POST['ddlDMPlan'];
    $post['BankDebitCard'] = $_POST['ddlPrimaryDebitCard'];
    $post['AppHomeStatus'] = $_POST['ddlHomeType'];
    $post['btnnext_x'] = $_POST['btnnext_x'];
    $post['btnnext_y'] = $_POST['btnnext_y'];
    $post['AppHouseNumber'] = $_POST['txtHouseNumber'];
    $post['AppStreet'] = $_POST['txtStreetName'];
    $post['AppTown'] = $_POST['txtTownCity'];
    $post['AppPostCode'] = $_POST['txtPostCode'];
    $post['AppCounty'] = $_POST['ddlCounty'];
    $post['AppAddressYears'] = $_POST['ddlTimeAtAddress'];
    $post['EmpIncomeType'] = $_POST['ddlPrimaryIncome'];
    $post['EmpEmployerName'] = $_POST['txtEmployerName'];
    $post['EmpTimeAtEmployer'] = $_POST['ddlTimeWithEmployer'];
    $post['EmpNetMonthlyPay'] = $_POST['txtAfterTax']; //needs changing
    // $post['following_pay_day'] = $_POST['ddlFollowingPayDay'] . '/' . $_POST['ddlFollowingPayMonth'] . '/' . $_POST['ddlFollowingPayYear'];
    $post['EmpPayFrequency'] = $_POST['ddlPayFrequency'];
    $post['EmpDirectPayment'] = $_POST['ddlPaidIntoBankAccount']; //change this
    // $post['next_pay_day'] = $_POST['ddlNextPayDay'] . '/' . $_POST['ddlNextPayMonth'] . '/' . $_POST['ddlNextPayYear'];
    $post['EmpNextPayDay'] = $_POST['ddlNextPayDay'];
    $post['EmpNextPayMonth'] = $_POST['ddlNextPayMonth'];
    $post['EmpNextPayYear'] = $_POST['ddlNextPayYear'];
    $post['EmpFollowingPayDay'] = $_POST['ddlFollowingPayDay'];
    $post['EmpFollowingPayMonth'] = $_POST['ddlFollowingPayMonth'];
    $post['EmpFollowingPayYear'] = $_POST['ddlFollowingPayYear'];
    $post['EmpNINumber'] = $_POST['txtNationalInsurance'];
    $post['BankAccount'] = $_POST['txtAccountNumber'];
    $post['BankSortcode'] = $_POST['txtSortCode'];
    // $post['chkTerms'] = $_POST['chkTerms'];
    $post['ReqMarketingOptIn'] = $_POST['chkMarketing'];
    // rint_r($post);
    $post['ReqAgent'] = '';
    $post['ReqDomain'] = '';
    $post['AppAddressMonths'] = 1;
    $post['ReqTotalTimeout'] = 60;
    $post['ReqLenderTimeout'] = 60;
    $postvars = str_replace('&amp;', '&', (http_build_query($post)));

    $ch = curl_init('https://000.co.uk/requestservice.asmx/Requestv4');
    curl_setopt($ch, CURLOPT_POST , 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS , $postvars);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_HEADER , 0); // DO NOT RETURN HTTP HEADERS
    curl_setopt($ch, CURLOPT_VERBOSE , 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER , 1); // RETURN THE CONTENTS OF THE CALL
    $Rec_Data = curl_exec($ch);

    $redirect = cut_str($Rec_Data, '<RedirectURL>', '</RedirectURL>');
    if (empty($redirect)) {
        echo $Rec_Data; //change this line to reflect any changes / error messages to be displayed
    } else {
        header('location:' . $redirect);
    }
}

function cut_str($str, $left, $right)
{
    $str = substr (stristr ($str, $left), strlen ($left));
    $leftLen = strlen (stristr ($str, $right));
    $leftLen = $leftLen ? - ($leftLen) : strlen ($str);
    $str = substr ($str, 0, $leftLen);
    return $str;
}

?>
<form target="_blank" action='' method="POST"  >
<input type='hidden' value='' name='AffiliateID' /><input type='hidden' value='' name='AffiliatePW' /><input type='hidden' value='' name='ReqMode' /><input type='hidden' value='' name='ReqTotalTimeout' /><input type='hidden' value='' name='ReqLenderTimeout' /><input type='hidden' value='' name='ReqLoanAmount' /><input type='hidden' value='' name='AppTitle' /><input type='hidden' value='' name='AppFirstName' /><input type='hidden' value='' name='AppLastName' /><input type='hidden' value='' name='AppEmail' /><input type='hidden' value='' name='AppDOBDay' /><input type='hidden' value='' name='AppDOBMonth' /><input type='hidden' value='' name='AppDOBYear' /><input type='hidden' value='' name='AppHomePhone' /><input type='hidden' value='' name='AppWorkPhone' /><input type='hidden' value='' name='AppMobilePhone' /><input type='hidden' value='' name='AppPostCode' /><input type='hidden' value='' name='AppHouseNumber' /><input type='hidden' value='' name='AppStreet' /><input type='hidden' value='' name='AppTown' /><input type='hidden' value='' name='AppCounty' /><input type='hidden' value='' name='EmpIncomeType' /><input type='hidden' value='' name='EmpEmployerName' /><input type='hidden' value='' name='EmpTimeAtEmployer' /><input type='hidden' value='' name='EmpNetMonthlyPay' /><input type='hidden' value='' name='EmpPayFrequency' /><input type='hidden' value='' name='EmpDirectPayment' /><input type='hidden' value='' name='EmpNextPayDay' /><input type='hidden' value='' name='EmpNextPayMonth' /><input type='hidden' value='' name='EmpNextPayYear' /><input type='hidden' value='' name='EmpFollowingPayDay' /><input type='hidden' value='' name='EmpFollowingPayMonth' /><input type='hidden' value='' name='EmpFollowingPayYear' /><input type='hidden' value='' name='EmpNINumber' /><input type='hidden' value='' name='BankAccount' /><input type='hidden' value='' name='BankSortcode' /><input type='hidden' value='' name='BankDebitCard' /><input type='hidden' value='' name='AppAddressYears' /><input type='hidden' value='' name='AppAddressMonths' /><input type='hidden' value='' name='AppHomeStatus' /><input type='hidden' value='' name='ReqConsent' /><input type='hidden' value='' name='ReqIPAddress' /><input type='hidden' value='' name='ReqAgent' /><input type='hidden' value='' name='ReqMarketingOptIn' /><input type='hidden' value='' name='ReqDomain' />
<input type="submit" value="Invoke" class="button">

What I need to do is have to pages one just for the form and a secand which prosses the form

  • 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-05-27T08:42:38+00:00Added an answer on May 27, 2026 at 8:42 am

    just create another php file and use require or include to include it.

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

Sidebar

Related Questions

I have a form that posts to process.php. Process.php send all the data to
I have a form that searches all rows in a single table (TServices) that
I have a contact form that is being submitted, I have PHP validation all
I have a form that POSTs information to one of my handlers. My handler
The code below works well in Safari but in Chrome and Firefox the form
I have a form that when submitted successfully generates new elements on the page
I have an ASP.NET MVC form that when submitted can return either an ActionResult
I have an Ajax form that updates a div when submitted with a submit
I have form that displays several keywords (standard set of choice lists that changes
I currently have form that checks if a user has unsubmitted changes when they

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.